Brackets: ctrl+z (undo) doesn't work after save anymore since 1.5

Created on 15 Oct 2015  ·  379Comments  ·  Source: adobe/brackets

There's no way of reverting a change that was made if the file was saved. I don't know if that's a feature (saved=saved), but it's really annoying, especially when working with git. I had to reinstall 1.4 because of that, I cannot do any work without my "undo"^^

Windows 10 x86_64
Ubuntu 15.10 x64

EDIT: november 1st, 2016 : TL&DR; check out https://github.com/adobe/brackets/issues/11826#issuecomment-257429242

high priority

Most helpful comment

Found Solution!!!
just modified these 2 variables in the Editor.prototype._resetText function and it totally fixed the problem.

added before any other code inside function:
text = text.replace(/(?:\r\n|\r|\n)/g, "\r\n");

and modified currentText definition to this one:
var currentText = this._codeMirror.getValue().replace(/(?:\r\n|\r|\n)/g, "\r\n");

Bye Bye undo reset!

Edit : The solution works great and after lots of tests I didn't faced the problem anymore even once. But this solution only makes text comparison properly detect the difference and the fact that the new lines of the saved code is different than the new lines of the code in the editor still remains and developers should take care of that!

All 379 comments

I use Fedora linux, in my Brackets working fine.

I was getting ready to open the same issue but notice this post. I can confirm the same behavior with Windows 7 64 bit.

Can you try debug>reload without extensions and see if the problem persists?
Which extensions are installed in brackets?

I got the exact same issue, with no extensions installed.
Windows 10 64-bit

Can you go to debug>show developer tools>console and comment the console logs here after undo fails?

I think this is what you meant:

Download the React DevTools for a better development experience: http://fb.me/react-devtools

/utils/DeprecationWarning.js:90 PreferencesManager.convertPreferences() has been deprecated. Please upgrade to the current Preferences system (https://github.com/adobe/brackets/wiki/Preferences-System#conversion-from-the-pre-36-preferences-system).
    at Object.convertPreferences (/preferences/PreferencesManager.js:325:28)
    at Object.eval (/utils/Resizer.js:548:24)
    at Object.context.execCb (file:///C:/Program%20Files%20(x86)

/command/Menus.js:820 Error setting menu item shortcut: 1
/command/Menus.js:820 (anonymous function)
/LiveDevelopment/MultiBrowserImpl/transports/NodeSocketTransport.js:87 NodeSocketTransport - start

file:///C:/Program%20Files%20(x86)/Brackets/www/SELECT%20*%20FROM%20custome…=%20:address%20AND%20postalcode%20=%20:postalcode%20AND%20city%20=%20:city Failed to load resource: net::ERR_FILE_NOT_FOUND

When I save the document seems to be flashing quickly, just as if I would open it anew.
Maybe there's something that causes the document to be refreshed/reloaded? And therefore flushes the undo history?

Are you working with live preview when this happens?

Nope :)

/command/Menus.js:820 Error setting menu item shortcut: 1
Can you try debug>reload without extensions just to be sure.

Hm, that worked, surprisingly. The document doesn't appear to be reloading now after being saved. And undo works. Huzzah!
What's odd is that I haven't installed any extensions.

deleting %appdata%/brackets folder should fix it then.

Yup, that did it. Great :D

I will try that and make sure to report back.

Can confirm the same issue on macOS Yosemite (10.10.5)

Ok, deleting %appdata%\Brackets solved the issue. I re-installed all my extensions and it still works. So maybe deleting everything isn't needed, like only 1 precise file?

The only change between 1.4 and 1.5 I had before encountering the error was to install Extract and ExportPDF. Maybe the issue comes from there?

Just in case it helps, here's a list of the extensions installed before I deleted the entire AppData folder:
2015-10-16_13-45-21
2015-10-16_13-45-34
2015-10-16_13-45-41

Aaaand the issue is back. It's a bug, definitively. It worked for a few hours and now it does not.

Same issue here: Ubuntu 14.04, Brackets 1.5

My undo history got cleared every time I saved (v1.5). debug>reload without plugins helped. Even after saying debug>reload with plugins it kept working again. I didn't uninstall the old version, just installed v1.5.

I'm getting the same issue. Reloading without extensions fixes it (though I've not been using it for long). This only applies to my Windows 10 64bit install - I've not got this problem on OSX.

Did this happen only after upgrading to 1.5?

Yeah, I just upgraded from 1.4 and encountered it in the first document I edited.

Ditto... I'm only experiencing it in my JS files tho, not my HTML or SCSS.

Happening with PHP files

Only happened after updating to 1.5

Release 1.5 build 1.5.0-16538 (release cf9cf4698)
Windows 7

Same here. Only tried with PHP files so far.

Debug > Reload Without Extensions has so far fixed the issue, but it's only been minutes since I've done that.

Upgrade from 1.4 to 1.5.0-16538 (release cf9cf4698).

Windows 10 Pro 64-bit

We are looking into this issue on priority.

Same here, with javascript files so far.
Windows 7 x64, version 1.5.0. No problems in 1.4.0.

I'll have to revert to 1.4.0 for the moment. This bug is costing me too much real work.

Ah yes, I had not thought about detailing: I'm also using Javascript files, as I do not use Brackets for other langs.

I am still not able to reproduce this in any of my machines. Does this issue go away after restarting brackets?

I have a little time, I'll do some testing and report back various cases and if or not I encountered the issue.

EDIT: well, I have no idea how to reproduce, I tried with different files & folders. I'm unable to reproduce atm, so maybe it even is totally random? Really no idea...

EDIT2: I have been using 1.5 for around 4 hours now, still not able to reproduce. Maybe because the bug I encountered was while using "large" folder (I'm in a project with about 15 light files, when I had this bug twice, I was working on a 15mb repository)?

Well then, let's list the plugins I'm using:

brackets-apache-syntax
brackets-display-shortcuts
brackets-indent-guides
brackets-lorem-ipsum
brackets-morecsscodehints
brackets-mystique-theme
brackets-oncopy
brackets-php-syntax-hint
brackets-scss-lint
brackets-various-improvements
camden.jshint
de.richter.brackets.jsonlint
denisov21.pop-up-menu-extension
dnbard.extensions-rating
drewkoch.icons
fede91.brackets-preferences-ui
gruehle.markdown-preview
hirse.outline-list
html-block-selector
io.brackets.svg-code-hints
ivogabe.icons
jeffbooher.bookmarks
lonelystorm.newline
mikaeljorhult.brackets-todo
nicolo-ribaudo.brackets-svg-font
petetnt.brackets-name-a-project
pflynn.charcount
pflynn.svg.preview
sasshints
scrollfix
soft-dark
talmand.disable-autoclose-tags
torin.duplicate

Maybe one of them is messing up Brackets somehow.
The theme I'm using is soft-dark, but surely this shouldn't make a difference.

Hope this helps.

Same problem after update from 1.4 to 1.5, Ubuntu 14.04.3 LTS.

debug>reload without extensions, helped in my case too, but I don't have any extensions installed, that seems strange to me.

Same issue here after the upgrade to 1.5 on (k)ubuntu. Any details/etc I can provide to help debug it?

Can you consistently reproduce this issue?
Also once this problem happens. goto edit menu and see the shortcut assigned for undo is ctrl+z

I haven't been able to really narrow down the possibilities, but here's my feeling:

It seems quite random, but happens with large projects (> 2.5MB) when a lot of modifications & savings are done on multiple files (> 5 files opened at once).
I wonder if it wouldn't have to do with the autocompletion of (), {}, [] and such, but have no evidence of it.
It could maybe also be relative to something that happens sometimes, when Brackets "representation of project" (tree in the panel) seems "out of sync" with the real project (hdd). It happened on 1.4 that I had a warning popup "this file and the one on your local drive arent the same: load from hard drive - save - cancel", and I think I haven't seen that on 1.5 so it might be related somehow.

As I said, only a feeling, as I've tested for half an hour different scenarii to reproduce and haven't been able to, but yesterday it happened while I was really working (a bug that can only happen if you don't 'pretend' to work, so it can preserve itself from destruction? evolution is a $#!@^^)

It's a quantum bug. One that exists and doesn't exist at the same time :)

But yes, you need to be actually working. But once it's triggered, undo should stop working reproducibly. So perhaps it is possible to work backwards from there.

Hello guys.

I'm having the same issue. But the only way I found to replicate it:

  • Open a file, make some changes and then save.

If you undo it will work.

  • Open a file, make some changes and then save.
  • Change your active window to the browser or something else.

Once you go back to brackets the undo won't work anymore.

I do wonder why the fix for the issue is planned for 1.6...
This bug makes 1.5 unusable. So I suggest this calls for a 1.5.1 maintenance release.

We still are not able to repro this bug. Steps mentioned by @knifir does not help! Can anyone else see the same behavior with the steps mentioned?

@abose been trying with the steps I've said. And sometimes it happens, sometimes it doesn't. Weird.

You could try working backwards. Is there _any_ reason why the undo-history might get resetted? If so, then remove those causes and let us test if it helps.

Undo history can be wiped out if the file is changed in the background, say by some other program.

Clearly, there are other causes for wiping the undo history... Or, Brackets unnecessarily thinks the file has changed in the background.

I could reproduce this with following steps.
1) Create a new document and save it to disk.
2) Copy something to the clipboard and rapidly keep pressing Ctrl + V , Ctrl + S in that order (paste and save)
3) At one point it prompts the user to overwrite changes because the file has been modified outside brackets. Here the undo history is lost.
This happens if the document already has a lot of content (10000+ lines) or the clipboard has lot of content.

Does windows file indexing mess with the document state?

I don't get a prompt. And I'm on a Mac. So that's probably a different
issue?
On Nov 2, 2015 11:46 PM, "Manohar Prabhu" [email protected] wrote:

I could reproduce this with following steps.
1) Create a new document and save it to disk.
2) Copy something to the clipboard and rapidly keep pressing Ctrl + V ,
Ctrl + S in that order (paste and save)
3) At one point it prompts the user to overwrite changes because the file
has been modified outside brackets. Here the undo history is lost.
This happens if the document already has a lot of content (10000+ lines)
or the clipboard has lot of content.

Does windows file indexing mess with the document state?


Reply to this email directly or view it on GitHub
https://github.com/adobe/brackets/issues/11826#issuecomment-153237427.

I am having this issue on Brackets 1.5; Ubuntu 14.04 with JS files and Scss files.
I read through the thread and decided to check my extensions. While going through the list I saw the "Go to Matching Bracket". I've never used it as the shortcuts are the same as Ubuntu's go to different desktop, so I removed it and restarted Brackets.

Currently the problem's gone. I will post if it reappears.

I ran into this issue yesterday too, it happened after I launched a second instance of Brackets. I tried to repro it but couldn't: after closing all the Brackets sessions everything went back to normal.

@petetnt you remainded me about my second problem on Ubuntu gnome, from day I installed brackets it requires cross button to be clicked two times to close the program no matter files are saved or not. Maybe it have relation with two instances and with this issue.

@ggat That is an older, separate issue that has had a fix pending for a long time (related issue #4611). If you have Linux native coding background (or know someone who does and would be interested in contributing to Brackets) help would be appreciated (with various Linux related things).

Any progress on this issue?

Honestly, for a bug this severe I would pull down the release and fix it before it gets re-released. After all, a bug like this may destroy work.

Tagging @ryanstewart @nethip @swmitra

Hey all, we're definitely hoping to track this down and if/when we find a fix, we'll push out an update ASAP. If others can post their extensions, that might help. Has anyone seen the issue when they've reloaded Brackets without extensions?

For me it happens without extensions as well as with.

Interesting permutation just happened for me: 1) hit ctrl + v to paste something, 2) ctrl + z to undo it, 3) ctrl + z again but it won't undo anything prior. It's like it breaks there. Not at save, but at paste. But sometimes it just stops working altogether. (Latest version, Win 8.)

I'm having this issue too. Undo history wiped after save. I do have a process running in the background that will compile all files in the directory after a save. So, I'm not sure, but it could have to do with another process touching the file.

I'm developing currently on Win7. Working with js, json, and html files, and it happens with all file types. I'll try on my Mac later today.

Same here. Impossible to do any work when you can't revert a change.

HTML, PHP, css, scss files, doesn't matter. With or without extensions.

Two different machines, one on Win7, the other on Win10. Reverting back to 1.4 until this gets sorted.

I'm unable to reproduce yet I haven't done any update. However, I stopped working on such a large repository (750+ files) and I'm now lighter (max 100 files). Maybe that's a lead?

@Madebym could you update back to 1.5. and see if you can repro the issue and check the dev console for possible errors?

New user here, I've been seeing the same thing on Win 10, Brackets 1.5, but for awhile it was easy to reproduce. I have a .JS file loaded in a small project. I have no extensions, and after doing "reload without extensions" just to be sure:

Type something and save.
Ctrl+z. Would undo.
Type something and save again.
Ctrl+z. Would not undo.

It was breaking for me on the second save, every time. Just to try it, I created a new file and tried the same steps, except this time it worked -- and now I can (currently) save multiple times on any file without issue. Sadly, I didn't get to check the dev console. I too might have to revert if this keeps popping up, it's made for a few nasty surprises. Good luck, guys.

update on my 5-days-ago post: I jinxed it. It does bug again on that smaller project since I added lines :(

I continue to think it's linked to total nb of lines or something like that.

In #11967 @designcise mentioned that this seems to happen after Find in files, which sounds like a potential culprit to me (as it was one of the biggest changes on 1.4-1.5. timeframe).

Find in files are localised to node changes. That may not be the reason here. We also did a code mirror update, that could be the likely cause. I have not been able to repro this issue till now, so all these are speculations.

@abose I was thinking something along the lines of the node process touching the files during (or after) the save for whatever reasons (occasionally), prompting the file(s) to (instantly) reload -> causing CodeMirror/Brackets lose the history.

You have better insight on the node implementation than I do so I might be way off though.

The reason i said that is, when a file is edited in brackets, we do not suddenly initiate a cache update. we just remove the changed file contents from the cache. The changed file is read only the next time a user performs a search. So the indexer is inactive during most of the time.
@swmitra was able to repro this once.

Hi, i'm using Brackets for Ubuntu 14.04 from 5 days ago and i have the same issue, i can't undo when save a file, but I'm unable to reproduce...
Now i'm working with javascript files.
it's really annoying...
I have to try if i use brackets with no extension and look if the problem appear again... I have this extension:

  • Beautify
  • Brackets CSS Color Preview
  • Brackets Git
  • Brackets Icons
  • Emmet
  • Tabs - Custom Working
  • Monokai Dark Soda
  • Indent Guides

Captured some debugging data today after getting hit by the issue:

https://gist.github.com/petetnt/f0693b2951c884c4dd20

(Note that the state after saving is the current cursor position)

tagging @swmitra @abhijitapte

Been using Brackets Release 1.5 build 1.5.0-16538 (release cf9cf4698) on Windows 10 64 bit since 4 December with PHP SmartHints & QuickDocs PHP extension and I can confirm that this problem happens so many times on my daily use even before i installed extensions. Undo is not working after saving files. The problem disappear after Reload without extension and Reload with extension.

I am using brackets Release 1.5 experimental build 1.5.0-16538 (release cf9cf4698) on ubuntu mate 15.04 64 bit. I confirm that I am facing the same issue.

Over two months in, and still no fix. And the release that has this bug is still on the website. Unbelievable.

Let me repeat myself: this bug can and will destroy work. A release with a bug like this should not exist. I can't believe you (devs) are so lax when it comes to something high-prio as this.

Sorry for that rant, but I don't want this to become the next breaking bug that has existed unresolved for over a year, like the Scrollwheel Bug.

I recently started having this problem and tested each extension individually. For me the problem seemed to only exist with this extension installed:
https://github.com/zaggino/brackets-file-tree-exclude

I don't use a lot of extensions at one time though. Currently about 4 or 5 at the most. But this extension (brackets-file-tree-exclude) is the only one that makes this problem visible for me. Not saying it is the cause because I don't know.

Hello all,

in an effort to get this fixed before 2016 I created the following extension:

https://github.com/petetnt/corrupt-brackets-history

It's a tool that can be used to corrupt Brackets undo history by writing and saving to a file continuously until the history fails. The script also saves an Profile with console.profile every time it has been run, which can be used to find the root cause for this issue.

Sadly I am AFK for the next 3 days, so I cannot work on this issue until 29th. Hopefully someone else has the time between their Christmas :christmas_tree: holidays and whatnot to try and find the cause. It's understandable that users like @thany are frustrated with the issue, but like this issue proves it's also very hard to debug but we can hope that my extension would help the situation a bit.

I also have this issue and am able to reliably reproduce and not reproduce the issue.

I am using Brackets: Release 1.5 build 1.5.0-16538 (release cf9cf4698)
On: Mac OS X 10.11.2 (15C50)

I regularly have projects that range in file numbers from 500 - > 20,000. The larger projects are usually using bower, grunt and composer so the extra files come from all the packages installed. This issue persists on all projects no matter the size.

For me this issue is pretty much constant, on every single file no matter how many lines or what type of file. Once I save I can no longer undo. Except for in one scenario which I will explain.

I have quite a few extensions install but I can make this issue go away if I disable Brackets Git.

This extension shows you a red or green bar to the left of the line numbers indicating what has been added or removed from the branch's version of the file.
screen shot 15

  1. If I add some code to the file and hit save I can no longer undo
  2. If I delete the code I just added back to the original state and hit save I CAN undo those changes
  3. If I delete only PART of the code I just added - hit save - I can no longer undo

If I disable Brackets Git, I can save and undo to my hearts content, now I have not tested this thoroughly because I use Brackets Git constantly and have just dealt with the not being able to undo issue (even though its very frustrating). However, any time I've disabled it I've not run across this issue.

Hope this helps!! Good luck!

I can confirm this bug on Windows 10 for Release 1.5 build 1.5.0-16538 (release cf9cf4698)

Only started to happen today, worked fine yesterday. Weird.

Working on a small project ( 1.5MB ) in .html / .php / .css / .js files. Extensions: Emmet and Extract for Brackets. Disabling the extensions has no effect.

Going to Debug > New Brackets Window and working in the new window seems to fix the bug.

Good luck!

The same issue. LinuxMint 17.3 Rosa.

Can someone sum up what is definitively known about the issue at this point?

This editor is great -- it can't be brought down by this bug.

It all smells like a typical "spooky action at a distance" antpattern to me. The authors seem unable to state what _exactly_ can cause the undo history to be reset, and the apparent causes seem totally random at this point.

What Brackets needs, is smaller and more frequent updates, to make it easier to diff between them and track down who changed what to have caused issues quite as deep as this one.

I just ran few more passes with my extension and I still have no good idea what is going on. Either the issue has existed from 1.0 (at least) or my method of corrupting the history is faulty (the next save occurs before the previous one happens, which I am not sure why it could be happening when CommandManager.execute returns a promise that gets resolved when the save is complete.

And even today (3 month later), I _the autor_ have no idea how it happens, it seems totally random, and my initial thought of "large files" doesn't seem to hold either.

@thany @petetnt I thought it was at least understood that the issue occurs when something (including a brackets extension) modifies or even 'touches' the active file. Has anyone at least worked down to the undo mechanism in the brackets source?

@arctwelve I don't think it has anything with the undo per se, but something happening to the file during, after or just before saving the file, which invalidates the history and starts it again, effectively destroying the undo (and redo) mechanisms in the process.

If I had to guess, it's some sort of race condition with saving the file and updating the CodeMirror history (which I already dug into last time I was checking on this early 2016, but couldn't really find anything useful). I thought that my corrupt-brackets-history would be the key, but like I said, the same happens up until 1.0 and even earlier sprints, rendering either the extension or bisecting useless.

@petetnt It looks like active files are watched by Brackets. For example, if you make a change to a saved open file in Brackets with another editor (and save it) then the changes are immediately reflected in Brackets. Other editors will prompt you with an external modification warning. If you accept the external changes in, say, TextPad, the undo history is lost, which seems normal.

But even doing a touch on a file open in Brackets will cause the undo history to be lost. The way Brackets interprets whether a file has been externally altered needs to be updated.

@arctwelve I think we debunked file watching itself on another issue related to this (file watchers never touch the files) but I have a new theory which applies to at least why my extension is failing:

When CommandManager.execute is called with Commands.FILE_SAVE (or any other SAVE related method) the function returns a $.Deferred promise that resolves when file saving succeeds (or fails). The execute calls (or the doSave-methods from DocumentCommandHandlers.js) aren't, however, queued or debounced in any way, making it possible to have an race condition where two (or more) COMMAND.FILE_SAVEs are called very close to each other (within milliseconds) which resolve when they are ready: the latter potentially resolving _before_ the former. edit: there are safeguards in place in DocumentCommandHandlers...

At this point CodeMirror could confuse the File History and just start it from the scratch. That explanation would explain why:

~- Removing the timeout in my extension makes it occur more frequently (almost always)~

  • This happening on larger projects / files makes it occur more frequently (more File I/O)
  • Makes it occur seemingly randomly (because pressing CTRL+S twice in a row is not an anomaly, but the File I/O resolving behind of times is).

Like Node docs say (https://nodejs.org/docs/v0.10.0/api/fs.html#fs_fs_write_fd_buffer_offset_length_position_callback)

file.write

...
Note that it is unsafe to use fs.write multiple times on the same file without waiting for the callback. For this scenario, fs.createWriteStream is strongly recommended.

We do wait for the callback usually, but that doesn't stop us from calling fs.write on the same time multiple files as currently there seems to be no mechanisms to block this.

//cc @swmitra @abose @nethip Do correct me if I am wrong

@petetnt - try 'touching' a file you're working on in Brackets. The history is lost.

@arctwelve I know, it's not related to this particular issue though (losing history after saving). I have an another extension called brackets-persistent-history with can persist your history over project switches, closing of Brackets and external changes.

@petetnt aha...hmm. ok. That's confusing since It seems like there's some cross-over in this thread with the general issue of losing history if an external file is modified (e.g., usually by an extension) and losing history after saving. In my case history is always lost after a file is saved because it's in the saved state when the file is vulnerable to _silent_ external modification. If a brackets file is just saved, it can be modified by an external process without warning: this is a problem. An unsaved file will warn the user, oddly enough.

Anyway, I'm not able to produce any working behavior with the extension you recommended, Is there a test case that should show it's working? Is it always on once installed?

@arctwelve Which extension, the corrupt one or the persist one? The corrupt one can be run from File -> Try to corrupt. The persistent one is always on, and you can test it by opening Brackets with file foo.js, doing changes, saving, closing Brackets, opening Brackets and pressing CTRL+Z.

It most likely won't help against this particular issue though because the history is nulled anyways (so the cached history will also be null).

Which extension is always nuking your file history? Anyway, this issue about the bug where saving nukes the file history, not about external processes nuking the file history.

Just to chime in with some of my experiences. I've said before that it happens with all file types, but now I can confirm it is only with css files.

Also, a few times I got a warning message in Brackets saying that the file has been modified outside of the editor(should I keep the changes and that stuff).

But the file hasn't been modified anywhere, there were no other editors opened that might have caused that.

@Madebym are your CSS files compiled (from say SASS or LESS files)?

@petetnt Nope, pure CSS.

I can give it a go with scss files later today. Will let you know.

I have also seen this message, when pressing Ctrl+S quickly many times.

@Madebym No need, but if you could provide an CSS file that causes you this kind of issues that would be helpful.

@valtlait Yup, it's something that might happen due to what I described on https://github.com/adobe/brackets/issues/11826#issuecomment-172765439: for why the message doesn't always pop up might be for the same exact reason: race condition with the stat timestamps

@petetnt Just happened now again. No other editor(like Notepad++ opened or similar).

css/styles.css has been modified on disk outside of Brackets, but also has unsaved changes in Brackets. Which version do you want to keep.

You want me to paste the whole CSS file here?

@Madebym Maybe create a gist of it (gist.github.com) and paste the link here.

Can you also tell me your operating system (and some hardware information, particularly is your harddrive an HDD or an SSD)

@petetnt Ok, here is the gist:
https://gist.github.com/Madebym/aa8a5f300d22eaacf61c

Operating system is Win7 Ultimate Service Pack 1, hard-drive is a very old HDD :)

I also have a Win10 on my laptop, I will copy the same exact project there and see how it behaves. But I know that same issues were also there when I use my laptop for development.

Tried to debug this again yesterday for couple of hours with this comment in mind but everything was pretty much a dead end, so one can pretty safely rule out file I/O.

Going through the stack of my corrupting extension I am currently looking into this particular CodeMirror function: https://github.com/codemirror/CodeMirror/blob/master/lib/codemirror.js#L7919
Just when the corruption happens this function gets called twice with the same change object.

For example if the corruption happens on the 16th try, we get two consecutive change objects where the text content is Try 15 and Try 15. However, the editor itself has correctly been updated to Try 16. Similarly the opId gets incremented by 3 instead of 1 like it does normally between the operations. This could be totally meaningless though, as It's hard to say if this happens because the history got corrupted or because the editor loses focus for a while when it triggers the debugger. Sam

ATTN those who have this particular issue:

  • Have you updated to 1.6?
  • Does this still happen to you?

I just ran preliminary tests with 1.6. shell and latest master and it seems that I am not able to reproduce this anymore.

Hi, I updated to 1.6 today, and found that I had this issue. It seems to work (I can undo after a save) but after multiple repeats of the action (type, save, undo), it stops working.

Windows 10
Brackets 1.6
rotary HDD
No extensions installed

Out of curiosity, why has a new version been released when a bug as huge as this one has not yet been confirmed to be solved? Personally I find this worrisome.

@thany it's a tough call. A minor version release doesn't demand that every bug be fixed, but it's sad to see a bug this serious still not fixed.

Still got this problem since 1.5, only 1.4 works fine

More progress: This is the end part chain that causes the undo history reset:

FileSyncManager#reloadChangedDocs 
-> FileSyncManager#reloadDoc
-> Document#refreshText 
-> Editor#resetText

Why the document gets reloaded as changed is still unknown to me.

I'm installing 1.6 right now. Will write later if the bug is still present.

Just updated to 1.6 and undo works after saving a file. :)

Updated to 1.6 and the issue has not come into occurrence till now.

Same ol', same ol' on my end. Doesn't matter if it is 1.6 or 1.5.

I haven't encountered this bug for day and a half.

Updated to 1.6 and the bug is sadly here.

The shadow of N++ is near.

Sill an issue :/ I thought 1.6 would solve it, but it didn't. Happens on Xubuntu 14.04 as well as on Mint 17.3.

Still happens. :((

Of course it does. It hasn't been fixed, so it obviously still happens. It wouldn't be good if this bug got fixed magically or by accident.

:+1: Still present on 1.6.0-16680 (release 3df0ac6fa) for my Windows 7 pc.

@thany I apologize if my comment was unnecessary, however I was under the assumption (obviously wrong) that since this issue was added to 1.6 Release milestone it would be fixed with the release. I came to check the state of the issue and since I saw it is still open I tried to provide at least some additional information to help you out (since I am currently not able to contribute in other way). Again, my apologies.

@vlad-saling No need to apologize really. You stated that you still have the issue and stated the operating system you are on === contributing :+1:

@thany No need to be snarky either.

@petetnt I was on mobile, so forgive my brevity.
So no need to apologize @vlad-saling, I'm just confirming as well. However, somehow some folks are hoping this is fixed, which is sad because it isn't.

+1 I have the same problem.

same issue on 1.6

Same problem, version 1.6 on a mac osx el capitan...

Ooh! It's a problem on OSX as well. NOW we can expect a fix. Because that's how it worked in the past, and that's how it's going to work now, I assume.

But seriously, this appears to be a problem for a seemingly diverse set of users, with 0 or many plugins, on all supported OS'es. On top of that, this bug can cause data loss, which makes me wonder why these releases aren't being taken down.

I will talk to @petetnt offline and look into this problem this weekend.

Clearly, there are a lot of comments to process, so my first goal is coming up with a consistent set of steps to reproduce the issue.

@lkcampbell Thank you for looking into this! Esp. during weekend. Yesterday I spent few hours trying to find consistent way to reproduce the issue myself (and going trough thread over and over again). So far no luck. What works once doesn't work the second time. I'll give it couple more tries though.

Hi all: I just posted #12175 which might be a potential hotfix for this issue.

If everyone running into this issue would be kind enough to apply the hotfix and see if this ever occurs again, that would be nice. See more information on How to hack on Brackets or ask for guidelines here.

Basic steps are:

  1. Install the latest Brackets build (this gives you the native shell binaries which you'll use in step 6)
  2. Fork the brackets repo (git clone https://github.com/adobe/brackets)
  3. Fetch submodules: cd brackets and git submodule update --init
  4. Add an my repo as a remote: git remote add petetnt https://github.com/petetnt/brackets.git
  5. Run setup_for_hacking script:

Mac tools/setup_for_hacking.sh "/Applications/Brackets.app"
Windows toolssetup_for_hacking.bat "C:Program Files (x86)Brackets"
(MUST be run in a Command Prompt started with "Run as Administrator")
Linux sudo tools/setup_for_hacking.sh "/opt/brackets"

  1. Fetch my branch git fetch petetnt petetnt/ctrl-z-hotfix
  2. Merge it with your master git merge petetnt/petetnt/ctrl-z-hotfix
  3. Restart Brackets if it was open

Hm, I got stuck at step 6 (maybe I am doing something wrong):

vlad@tp420:~/apps/brackets (master)
$ git remote -v
origin  https://github.com/adobe/brackets (fetch)
origin  https://github.com/adobe/brackets (push)
petetnt https://github.com/petetnt/brackets.git (fetch)
petetnt https://github.com/petetnt/brackets.git (push)
vlad@tp420:~/apps/brackets (master)
$ git fetch petetnt ctrl-z-hotfix
fatal: Couldn't find remote ref ctrl-z-hotfix
Unexpected end of command stream

Whoops @vlad-saling , the branch is called petetnt/ctrl-z-hotfix not ctrl-z-hotfix. Fixed it.

git fetch petetnt petetnt/petetnt/ctrl-z-hotfix

Np, it works now. Thanks :)

Just to be sure though, upon merging the output is:

vlad@tp420:~/apps/brackets (master)
$ git fetch petetnt petetnt/ctrl-z-hotfix
From https://github.com/petetnt/brackets
 * branch            petetnt/ctrl-z-hotfix -> FETCH_HEAD
vlad@tp420:~/apps/brackets (master)
$ git merge fetch_head
merge: fetch_head - not something we can merge

Hmm it should say that one file was changed. Try git merge FETCH_HEAD or git merge petetnt/ctrl-z-hotfix instead (it's case insensitive on Windows but might not be on Mac)

Got it. Had to use git merge petetnt/petetnt/ctrl-z-hotfix like this:

vlad@tp420:~/apps/brackets (master)
$ git merge petetnt/petetnt/ctrl-z-hotfix
Auto-merging src/filesystem/FileSystem.js
Merge made by the 'recursive' strategy.
 src/filesystem/FileSystem.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
vlad@tp420:~/apps/brackets (master)
$ git status
On branch master
Your branch is ahead of 'origin/master' by 2 commits.
  (use "git push" to publish your local commits)

nothing to commit, working directory clean

Btw, working on Linux Mint 17.3, git 1.9.1 .

Need to do some prototyping today, so I'll be using Brackets. I'll let you know if your update worked for me.

Thanks, I fixed it once again (I always do that error with named/branches :joy_cat:)

Haha. No problem at all. Glad we figured it out. Btw, I did similar name/branch "mistake" two days ago myself :)

With update from @petetnt I can replicate the issue quite consistently, but it includes Brackets Git plugin so I am not sure you can use it for debugging. In any case, here are the steps:

  1. Open any project with git repository
  2. Change something
  3. Save file (at this point you I can still do "Undo")
  4. Commit file via Brackets Git (committing via CLI git won't kill the undo). Push is not necessary.
  5. Undo for open file isn't working anymore

I replicated the issue everytime I tried it (5-6 times in a row). Although, given the history and nature of this bug it could be just a wild coincidence.

Note: r1.7 is very fast.

@vlad-saling I was worried that the change might effect other external changes. However, I installed brackets-git to debug and everytime I click commit, undo history disappears. something to be committed, the old stat becomes undefined regardless of my fix or not, which makes Brackets clear the cache, nullifying the history.

@zaggino Can you weight in on this?

@petetnt looking at your fix https://github.com/adobe/brackets/pull/12175. I agree with you that allowing the cache to be cleared when the old modified date is _newer_ than the new modified date is a strange thing to do. So, your current theory is a race condition might be setting up this odd scenario?

I suppose if code that depends on this code didn't consider this exceptional possibility it could break.

@petetnt re: https://github.com/adobe/brackets/issues/11826#issuecomment-177210314, just to clarify, the old stat becoming undefined would be a completely different problem than the "old modified date is newer than the new modified date" problem, correct?

@lkcampbell Yup. FWIW, every time I open the commit window on Brackets-Git

1) Lose any CodeMirror history
2) Get this error:

[brackets-git] call: git rev-list --left-right --count undefined/master...@{0}
Error: fatal: ambiguous argument 'undefined/master...@{0}': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
    at Object.exports.toError (file:///C:/Users/***/AppData/Roaming/Brackets/extensions/user/zaggino.brackets-git/src/ErrorHandler.js:157:19)
    at NodeConnection.<anonymous> (file:///C:/Users/Pete/AppData/Roaming/Brackets/extensions/user/zaggino.brackets-git/src/Cli.js:185:44)
    at j (file:///C:/Program%20Files%20(x86)/Brackets/dev/src/thirdparty/jquery-2.1.3.min.js:2:26911)
    at Object.k.fireWith (file:///C:/Program%20Files%20(x86)/Brackets/dev/src/thirdparty/jquery-2.1.3.min.js:2:27724)
    at NodeConnection._receive (file:///C:/Program%20Files%20(x86)/Brackets/dev/src/utils/NodeConnection.js:498:34)

IMHO it's unrelated, but cannot really be sure. I am pretty sure that #12175 fixes the issue where the CTRL+Z combination just stops working.

So far the best strategy we have is for people who are experiencing this issue on a regular basis to try out the hotfix that @petetnt posted recently. Let us know if it works and also if it causes any new problems to appear. if it appears to work after a week or so, we can try submitting it.

The commit is located at: https://github.com/adobe/brackets/pull/12175

I havn't tried the fix yet since I didn't encouter ctl-z issue after that but if it does any help in indentifying the culprit, I also sometime face issue in tab and enter. The editor stop responding to them and when I reload the editor, it start working again.

@lkcampbell @vlad-saling I tried to debug the brackets-git issue and

1) The error I posted wasn't the cause for the history disappearing
2) The old stat doesn't get undefined after all

Which leads me to think that it's completely separate issue

@vlad-saling, can you disable the Strip trailing whitespace from commits option in brackets-git and see if that helps. See https://github.com/zaggino/brackets-git/issues/1274 for more details.

@petetnt I was thinking the same thing indeed. I'll try it.

Also, I am currently trying to track down and issue (without Brackets Git involved), where touch mentioned by @arctwelve disables Undo. Which would not be a problem in itself, but if it starts happening once (accompanied by flash like @Truzel described) it happens with every Ctrl+S thus killing Undo on each Save (not matter if the file was really touched outside Brackets or not).

It's feels like a bit of a shamanistic ritual, where for the "magic" to happen is must be the 4rh Firday of the year, night sky must be clear, a white crow needs to sit on your lap while your right hand, holding 3 pieces of bear hair, is above your head and you are watching that episode of Friends when Joey's ceramic dog appears for the third time. All simultaneously of course :/

@petetnt I was able to replicate repeating undo-lost-on-save issue (Touch-ing file once) with leaving Brackets Git totally out of the equation. However, I can replicate it only on Mint and Xubuntu. Windows and Mac are working fine. Is there a way I can capture what is happening inside Brackets so I could share it with you? I tried debug>show developer tools>console but there is no entry for when undo fails.

@vlad-saling You could try an capture a Profile via the dev tools (if profiling is there on the Linux versions, they are using quite old CEF) and posting your exact steps. (I couldn't save the profiles on Windows though, not sure if it's platform specific).

However, many external changes nuke the history: this issue is quite ambiguous about which we are talking about: I have assumed that it's due to the bug where history stops working after saving for whatever reasons, and that's what https://github.com/adobe/brackets/pull/12175 is aimed for.

Then there's the general case of history stopping working in general (usually due to the document being reloaded due to external changes): at this point Brackets should warn about external changes made, but doesn't. Or when something like the Brackets-Git committing removes the history.

Now that I look at the first post in this issue, it might be talking about the issue in brackets-git, but then the 20 or so next ones are talking about the bug that #12175 should be fixed.) I would be in favor of dropping the hotfix link to this issue once more, creating guidelines for the specific cases (that bug, external changes and extension issues), creating issues for each of them and the locking this issue.

@petetnt Can you clarify: in the case of just saving a file in brackets causing history to stop working, do you mean history stops working completely from that point on (i.e., undo is permanently broken until restart), or is history just lost once, similar to how it's nuked by an external change?

I'm going to open an issue about warning on external changes on saved files, I feel that Brackets silently loading external changes is the cause of a lot of this heartache.

@arctwelve: the history stops working completely (as in: history works until you between saves, but gets nuked _every time_ after saving) until you reload Brackets because (I think) when the wrong value gets cached to entry._stat once, it screws all the future comparisons too.

Brackets shouldn't silently load new changes unless you have forced it to (ie. pressing the "reload from the disk" option in the modal warning), but I think that this check: https://github.com/adobe/brackets/blob/afb5249413781bf2f25a2d36baa7ba7ce3bca7f8/src/project/FileSyncManager.js#L123 has some issues.

Edit: I have made some edits to this post, see more on: #12181

@petetnt I agree that we should just call this issue the "saving through Brackets" issue or maybe the "internal change" issue.

As far as the "external change with no External Change warning box" issue, among which is an example of using the git extension and losing the undo history, it looks like you are at least discussing it at https://github.com/zaggino/brackets-git/issues/1274. I agree with you, let's keep that issue as a separate issue, along with all "external change" issues. The idea of tracking down state changes made by external processes sounds very complex and may have to be solved on a case-by-case basis.

@vankasteelj to clarify, did you say you installed the hotfix and can still reproduce the issue? Even without the Git Extension?

Facing same issue.
Release 1.6 build 1.6.0-16680 (release 3df0ac6fa) Windows 8

@ankurloriya Did you try the hotfix I posted if it changes anything? https://github.com/adobe/brackets/pull/12175

Just wanted to mention that I installed the hotfix that @petetnt mentioned above. Everything installed great but when I tried to open brackets I got an alert that said Brackets was damaged and asked me to move it into my trash. Im on a Mac os X 10.11.3. To resolve this you have to go into your system preferences > Security & Privacy > General and make sure the "allow apps downloaded from anywhere" option is selected. Then you can open brackets. Just in case someone else runs into this issue. :D

I would also like to mention, that so far (I literally just installed this) the hotfix has FIXED my issue of not being able to undo after save. I've only tested it in one file so far. But I removed code, saved, added new code, saved and the was able to undo all of those changes. !! yay !!

@rachelmflowers Great to hear that :+1: Do notify us if the issue resurfaces again.

@lkcampbell no, I haven't tried the fix, tbh I'm not even sure how to test it, I never tried building Brackets. Is there a jenkins somewhere serving builds? Or can I just, like, modify main.js and map ?

I'm messing with is myself and sort of learning by default

On Thursday, February 4, 2016, Jean van Kasteel [email protected]
wrote:

@lkcampbell https://github.com/lkcampbell no, I haven't tried the fix,
tbh I'm not even sure how to test it, I never tried building Brackets. Is
there a jenkins somewhere serving builds?


Reply to this email directly or view it on GitHub
https://github.com/adobe/brackets/issues/11826#issuecomment-180074408.

Kind Regards,

Mr. Cullen Brooks

_Contract *_Sound Designer | Audio Dialogue Specialist | SFX Designer
| *_Mixing
Engineer_

248.910.1544

https://www.instagram.com/mrbrooksmixing/
https://www.linkedin.com/in/cullenbrooks
https://www.facebook.com/cullen.brooks
https://plus.google.com/+cullenBrooksMrBrooksmixingLLC/posts
https://twitter.com/mrbrooksmixing
_CONFIDENTIALITY NOTICE:_
The information contained in this email and any attachments is intended
only for the individual or entity to which it is addressed. It is
confidential and may be legally privileged. If you are not the intended
recipient from _MrBrooksMixing LLC_ or any other third party contributors you
must not copy, distribute or take any action in reliance on it. If you
receive this message in error please notify us immediately and return the
original to the sender. Please acknowledge that all materials downloaded
through this E-mail are copy written and solely owned by Said Artist,
Producers, Labels, *MrBrooksMixing LLC *or any other third party
contributors and other said media productions, All rights are reserved. By
downloading this material you agree to not use in any way and (or) disclose
this material to any third parties without written consent.

_© 2013 - 2016 MrBrooksMixing LLC _ALL RIGHTS RESERVED

@vankasteelj See this comment for instructions on how to install/enable hotfix https://github.com/adobe/brackets/issues/11826#issuecomment-177135304. It worked for me. (LM 17.3)

Same issue build:
Release 1.6 experimental build 1.6.0-16680 (release 3df0ac6fa)

@mycool0943 Have you tried the hotfix? https://github.com/adobe/brackets/issues/11826#issuecomment-177135304

I'm not coding much these days, but since I applied the supposed hotfix, I haven't encountered the issue. That does not mean it's fixed, as I said, I haven't done much lately. But it's an info that you might find valuable.

Thanks! I will apply the hotfix today and see if that helps.

Michael J. McCormick
~Programmer~

_Desk:_ 405-548-0118
_Mobile:_ 405-556-0740

_"Learning never exhausts the mind."_
_~Leonardo da Vinci~_

On Wed, Feb 10, 2016 at 6:47 PM, Jean van Kasteel [email protected]
wrote:

I'm not coding much these days, but since I applied the supposed hotfix, I
haven't encountered the issue. That does not mean it's fixed, as I said, I
haven't done much lately. But it's an info that you might find valuable.


Reply to this email directly or view it on GitHub
https://github.com/adobe/brackets/issues/11826#issuecomment-182659043.

Reopening this issue for the time being till the release is out.
The issue should be fixed in master thanks to @petetnt .
However, keeping it open to check if there are other cases to consider/ identify why the file stamps mismatch.

great! :)

+1 Thank you @petetnt (and everybody who worked on this).

I have this problem on Release 1.6 build 1.6.0-16680 (release 3df0ac6fa) Windows 10. If i delete %appdata%/Brackets it solves the problem.

I noticed the fix I previously applied doesn't work as it should: I still have the issue.

@vankasteelj Well dang, that's a bummer. As the first report of the hotfix not working, can you share what you were doing when the issue occurred and did it manifest the same way?

What happens?

It's the same result: can't undo.

How did it happen?

It happened while working on a 100+ file repository, written in JS. I have the same plugins/modules as before and I didn't update or tamper with Brackets core-code.

At first, I thought it was because I was working on 2 exact same files, one from the current repository, and one copy of it on my desktop (99.9% similar file, 100% same name, but different path), and I was NOT using the split-screen feature. But it turned out that it's not related to that as it also happens now that I'm not using the 2 same files anymore.

A wild idea appears

Another idea, maybe, as someone said that removing %appdata%/Brackets solved the issue, is that it's the "history length" or the dumps going wrong.

Something weird with console:

Here's the console:

brackets_2016-02-29_17-08-11
You'll notice one weird thing:
file:///C:/Program%20Files%20(x86)/Brackets/www/Mark%20Episode%20as%20watched%20on%20channel: Failed to load resource: net::ERR_FILE_NOT_FOUND
"Mark Episode as watched on channel:" is line of code of the file i'm working on, it's obviously not related to brackets, and it's not a file in "Program File", at all. See my code:
brackets_2016-02-29_17-10-47

Maybe it's somehow related?

I also have had this issue come back since implementing the hotfix. However its only on my scss files that I've noticed so far. I can still undo after save on my php files and other files.

I think the reason why I cant undo after save on my scss files is because I am using grunt, so after I save and grunt compiles my sass from my watch task, sometimes i get the "your file has been edited externally" pop up asking me to reload from disk or keep brackets changes.

That's the only time that I have an issue with undoing after saving though. For the most part its been resolved by the hotfix.

Thanks for the info @rachelmflowers and @vankasteelj

One thing I am not sure about if those issues are due to the general issues Brackets is having regarding outside changes or because of the undo-bug that the hotfix is combatting.

@vankasteelj Can you check out this issue: https://github.com/zaggino/brackets-git/issues/1274

@rachelmflowers Can you post your Gruntfile or the sass task to gist.github.com and paste it here? Grunt-Sass shouldn't touch the source files themselves (they should nuke the *.css it compiles though. (I use ´grunt-sass` on all of my projects and I haven't noticed similar issues)

I do not have a "commit" button, as I don't use brackets-git, I manage my gits with a CLI (typically gnome-terminal on linux and git-bash/mingw on windows). I do use "Show Git Branch for project" (brackets-git-info) module though, which might have similar impact for some reason (I don't see how showing branch and commiting should be linked, but... who knows).

I have a pretty crazy grunt setup.

I've included my main Gruntfile.js, the _grunt-project-config.js which has all the main project variables, and also the task config js files, for all the tasks that run after a change in the sass files, that are configured in the main watch task.

Let me know if you want to see any of the other task configs (they are in separate files instead of all being in the main Gruntfile, or else that file would be huge.)

https://gist.github.com/rachelmflowers/ae35fabf9f563e099d8e

Note: I deleted one message above with unlikely pondering.

@vankasteelj I checked the brackets-git-info module and does mess around with file stats but only for Git HEAD. Unless that triggers the whole cache to get invalidated (which it could I guess), not sure if it's a culprit. You could try and see if disabling that extension helps.

Similarly with @rachelmflowers, if I had to guess I would look into https://github.com/DennisBecker/grunt-sass-globbing which might touch the sass files in question

Greetings,

i have the same problem with a less file saved via sftp (eqftp plug-in) on a remote VPS.

FYI, the less file is watched to generate the .css.

I do not have have that problem with .htm file.

I've noticed that this only happens after a file has been saved.

On Wed, Mar 2, 2016 at 8:37 PM, kibatz [email protected] wrote:

Greetings,

i have the same problem with a less file saved via sftp (eqftp plug-in) on
a remote VPS.

FYI, the less file is watched to generate the .css.

I do not have have that problem with .htm file.


Reply to this email directly or view it on GitHub
https://github.com/adobe/brackets/issues/11826#issuecomment-191290408.

_Designcise_

Connect with us:

Hi @designcise, have you tried the hotfix posted above? It should fix the generic issue of losing undo history after saving.

General notice for everyone in this issue and those who might see this issue later:

For those still having this issue...

If you think that the issue occurs due to external changes (for example: task runners, FTP connections, version control systems, or even due to a Brackets extensions, if would be awesome if you tried these steps first:

  1. Use Brackets without extensions (Debug -> Reload Without Extensions) and see if the still occurs

If it does

2a.Try the hotfix stated above and try again
3a. Report your findings (whether the hotfix worked, or not, what were you doing)

If it doesn't
2b. Launch Brackets again and try to pinpoint the root cause. For example, if you think it's your SASS compiler, try to compile the files manually for a while.
3a. Post your finding to issue #12181 as detailed as possible. Don't worry if you can't single out the root cause: In that case you can post your Health Report available from Help -> Health Report.

Thanks :+1:

Same here.

I'm runnung ubuntu 14.04 and brackets:
Release 1.6 experimental build 1.6.0-16680 (release 3df0ac6fa)
build timestamp: Tue Jan 12 2016 14:45:31 GMT+0000

For further notice, @petetnt Has deleted the ctrl-z-hotfix repo and it is included in a refreshed version of 1.6 as stated here https://github.com/adobe/brackets/issues/12300

So just reinstall Brackets 1.6, simple answer. (for Windows users)

Posting so that noone has to reread everything and figure out wth is going on lol.

@basickarl Sorry about that. I restored the branch just in case.

But yeah, Try re-installing Brackets 1.6. first

@petetnt No worries dude! Just happy you fixed the issue :) I just reinstalled and it seems to be working (on Windows), for now. I'll get back if it breaks.

dpkg tells me my version is more recent than the one on brackets.io, I installed it a few days ago (can't remember if it's from official website or webupd8 ppa).

nevertheless, i'll try that too, but with the version I had (more recent than brackets.io), the issue was still present

@vankasteelj I can imagine that the only one updated with the fix is on their website, leaving the other repos with the broken versions. As petetnt was saying, download the one from brackets.io 'n get back if it's still borked!

Same ol', same ol' unfortunately on my end. Downloaded the latest version from brackets.io.

Funny thing is that I grown accustomed to it, being careful when writting css has become second nature to me :)

Does the download without extract have the patch?

When was the download on brackets.io updated? I notice that the download I
got on Feb. 15th has exactly the same byte count as the one I downloaded
just now.

On Fri, Mar 25, 2016 at 7:01 AM, Mirko [email protected] wrote:

Same ol', same ol' unfortunately on my end. Downloaded the latest version
from brackets.io.

Funny thing is that I grown accustomed to it, being careful when writting
css becomed second nature to me :)


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
https://github.com/adobe/brackets/issues/11826#issuecomment-201240275

What i do until it's solved is to comment the code with ctrl+shift+/, it comment properly both css and html (same shortcut).

@kibatz Undo does more than recover deleted code. What if you modify some bits here and there, save it, and then realize you didn't need those changes? Horror ensues, that's what. I strongly advice everyone to stick with Brackets 1.4 until a fix is released.

Having said that, is this issue fixed yet? Seems like (and has seemed like) this needs to be released before the arbitrarily scheduled 1.7 release. I would deem it horrible enough to justify a maintenance release.

Hi all, as we did not change the installer version number to 1.7, for the interim release, the installer team uncovered a ton of bugs [like ghost 1.6 install entries, double installs etc] when we tried to do a build refresh of 1.6 installer. We tried fixing it, but it was taking a lot of effort to add minor version support and bug fixes in installer and other scripts.
We will most probably do 1.7 within two weeks as this is the case.1.6 patch with this fix didnt go as through as expected.

Seems to me like semver is due :)

+1

We will most probably do 1.7 within two weeks as this is the case.1.6 patch with this fix didnt go as through as expected.

So 1.7 will still have this bug? If so, why is 1.7 going to be released then? Postpone the release then. Who cares if a release is arbitrarily on time if it contains a devastating bug?!

experienced this as well, devastating enough with this bug, without CTRL+Z, i have to switch to atom because of this bug

I've experienced the same bug, but only with CSS and JS and NOT with HTML files.

I can undo with CTRL+Z as long i didn't save the CSS / JS file. After saving, it isn't working anymore.
But not so in a HTML file, where CTRL+Z works just fine after saving.

Linux Mint 17.3

@scopolamin I suggest downgrading* to 1.4.

*_) well, considering this bug, it's an upgrade actually._

I just worked 5 hours on a project, without any issue, but yesterday, on another, the issue has risen 3 or 4 times in the day (closing/reopening brackets fixes it).

Could it somehow be linked to changes to .git/ directory, that reloads when stuff gets commited?

@scopolamin @vankasteelj @thany We have merged a PR which possibly might fix the underlying problem. Unfortunately we could not refresh the _release_ builds(1.6).

Could you run Brackets from _master_ to see if it fixes the problem?

Ok sorry, I thought the 1.6 currently available had the hotfix. I probably missed something here. I'm running master as my "production editor" now and I'll see if this particular issue occurs again. Hoping I'll be able to use it without further issues due to being in dev, not an actual release.

@nethip I can certainly try if you (or a doc) can explain how to do that ;)

I linked how right above

Cool, I got it working. I'll give it a go for a while.

/edit
Nope. Still happening for me :(

Here's a thought: why not simply _never_ reset the undo history? Like, completely destroy whatever could possibly ever reset the undo history and be done with this issue?

/edit2
Seems to be fairly reproducible with files that are committed to a git repo.

it seems fixed for me, I haven't encountered the problem in maybe 15 to 20h of using brackets (and git), switching between ubuntu & windows, both using same brackets sources (39fdee074193da)

@thany how exactly would you reproduce it? Step by step?

This is how:

  1. Edit a file, scss in my case
  2. Save it
  3. Compass kicks in, generating css
  4. Switch to SourceTree
  5. Commit the file
  6. Switch back to Brackets

But there are likely other variables that I have no knowledge or control over...

i give up with brackets, to mutch bug, this one, and ftp problem also, thus i cant work with. Good luck with it.

Hi,

I have the same issue and it is caused by some keyBinding issues.

I've targeted one issue with "Ctrl-Shitf-2"
capture

I'm using latest version of Brackets on Windows 10

Hi!
I had the same problem and just solved it ... YEEEES !!!
I did not read all messages, but I encountered the issue only after saving, i.e. if I did not save I could use the Undo.

Now the solution (at least for me...): the problem was related to the split view (vertical split). So, the solution was just to unsplit and then to resplit and Hurra ;)

I hope it'l help some of you guys...
++

@Laul Thanks for the workaround 👍 This would for sure help us in narrowing down the issue.

@thany @scopolamin Will you be able to add the following log to the code mirror's clearHistory() function , present in codemirror.js and launch Brackets from source? Once the dev environment is set, this file would be located at src/thirdparty/CodeMirror/lib/codemirror.js.

clearHistory: function() {console.error("History Cleared"); this.history = new History(this.history.maxGeneration);},

So whenever you run into the undo history bug, open Developer Tools and check for the console log. The console should be showing the call stack which would have led to clearing the history. Please post the console log, once you run into this bug.

Meanwhile I am digging around split view code to see if any part of the code is nuking the undo stack.

Reopened this as the PR https://github.com/adobe/brackets/commit/f1b699a51d159821de8ef6517f81c06a3b53a550 automatically closed this issue.

@nethip I saw your comment just now, so I'll try it later (after my day off tomorrow, at the earliest).

@Laul Split view isn't the problem (or not the only problem). I never use it. And certainly unsplitting & resplitting won't _restore_ a nuked undo history, would it?...

I think my idea still stands: Just simply NEVER clear the undo history. NEVER NEVER NEVER clear it. Completely NUKE any code that does any kind of clear of any kind of undo history at all everwhere always. Atomic annihiliation on anything that might clear the undo history! :)

Should fix it. Should also keep undo history when it _should_ be nuked, but hey, what's worse: loosing work, or remembering too much work :D

@thany mmh... 'm not sure your description/reason is really applicable in my case: I never (ever !!) clearw the undo history - why would I ?! Rather, it's as if the fact to save file did it for me. Here is a good way to reproduce the issue in my case ; but others could experience same behaviour because of another problem...:

  • open project
  • split view
  • work on both left / right sides for 5-10 minutes minimum
  • after "save command" to any file, "undo" command is deactivated in all project files (already opened, or closed and then opened, while the issue already appeared). Note that I did not tried to open files outside the project folder
  • merge back the view ; try "save" -> working while in the merged view
  • split view again ; try "save" -> working while in the split view... until issue be back.

What I don't know is the exact reason why after the 5-10min it deactivates the "undo" function...
I really hope these details will help you and will make the situation clearer than after previous, limited post.

@Laul the last two paragraphs in my comment weren't aimed at you, but rather at the Brackets sourcecode. Sort of. Sorry if that was confusing :)

I'm having the same issue on:
Release 1.6 build 1.6.0-16680 (release 3df0ac6fa)
Windows 8.1
Reload without extensions fixes it, but I'd like to use my extensions and have undo functionality at the same time :)

Same issue here
build: 1.6.0-16680
OS: ubuntu 15.04
even without any extension the bug occures.
Thank you for the efforts !

Release 1.6 experimental build 1.6.0-16680 (release 3df0ac6fa)
OS: Linux Mint 17.3
Even without any extension the bug occures.
Thank you for the efforts !

This issue is 7months old...

I personally cant keep on loosing time using Brackets. I moved on to my new fav text editor: Visual Code

Have a nice day everyone

I will try it also.

Abraço,
Denilson Telaroli.

2016-05-10 17:02 GMT-03:00 Matt [email protected]:

This issue is 7months old...

I personally cant keep on loosing time using Brackets. I moved on to my
new fav text editor: Visual Code

Have a nice day everyone


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
https://github.com/adobe/brackets/issues/11826#issuecomment-218273393

We are trying our best to fix this issue. Since this is very hard to repro from our side, we are relying on your help. So request whoever is facing this issue, to run Brackets from source and provide us the logs, whenever the issue occurs. Please refer to my previous comment https://github.com/adobe/brackets/issues/11826#issuecomment-211507070

I just to add my 2 cents. I'm running Brackets Release 1.6 build 1.6.0-16680 under Windows 7. Undo does not work after a save.

You're right. While I don't have anything called git extension,I disabled Extract for Brackets (Preview) and undo works again.

brackets-error

@nethip

scenraio:

  • I had 9 files open
  • Made changes in one file (call it x.js - 983 lines) [and saved the file]
  • Moved to another file (call it y.js - 6070 lines)
  • copied some text from y.js and pasted in x.js [and saved]
  • again, copied some text from y.js and pasted in x.js [and saved]
  • ctrl+z no longer works

Hope it helps

EDIT 1: Now every time i made changes (in x.js) and saved, the count of History Cleared error increased i.e. it went from 5 to 6, from 6 to 7 and so on, on every save

Thanks a lot @vvks for sharing the logs. Really appreciate you helping us on this.
I will have a look at the code to see anything weird.

Thanks @borisb13 for helping us nail down the issue.

Regards,
Prashanth Nethi

From: borisb13 [mailto:[email protected]]
Sent: Tuesday, May 24, 2016 2:22 PM
To: adobe/brackets [email protected]
Cc: Prashanth Nethi [email protected]; Mention [email protected]
Subject: Re: [adobe/brackets] [fix pending]ctrl+z (undo) doesn't work after save anymore since 1.5 (#11826)

I just wanted to chime in on this -- I've tested multiple configurations, methodically changing some settings that I thought could cause this, and even ran Brackets without extensions for a few days. And I think I found what's causing the problem.

Turning off code folding completely resolves this issue. With every other setup I tried, this undo problem would manifest itself within minutes. But with code folding disabled, and all of my extensions enabled (5 of them), I haven't had a problem for a few days.

Now, obviously, this isn't a fix, but I'm hoping that it helps the developers track down the problem


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHubhttps://github.com/adobe/brackets/issues/11826#issuecomment-221206172

Sorry, I should have let it run longer. Literally as soon as I posted my
comment, I went back to Brackets, and it wouldn't let me undo again. So, I
deleted my comment, and I'll do some more testing (perhaps turning off code
folding and also removing all extensions).

This happened to me so often that I had to switch to another editor.

Used version 1.6, Ubuntu.

Can't use CTRL+Z nor CTRL+Y just in .twig files. Sadly, swapping to another editor.

Does 1.7 include the (atm considered partial because apparently unsure) fix from above ?

The same question:Does 1.7 include the (atm considered partial because apparently unsure) fix from above ?

I had a folder inextensions > user, that was not a proper plugin (just my notes) – Undo-history was broken at JS files (at HTML, SCSS was OK).
Ctrl+Z came back when I deleted that not-proper-extension folder.

Sorry, there's no connection. The bug is back :/

Deleting extensions did not fix it for me.
On Jun 13, 2016 5:14 AM, "Rafiozoo" [email protected] wrote:

I had a folder inextensions > user, that was not a proper plugin (just my
notes) – Undo-history was broken at JS files (at HTML, SCSS was OK).
Ctrl+Z came back when I deleted that not-proper-extension folder.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/adobe/brackets/issues/11826#issuecomment-225528216,
or mute the thread
https://github.com/notifications/unsubscribe/AQpz9cP_I3T2SwTXcYkwHQGIz8GlWiw1ks5qLR9xgaJpZM4GPktK
.

This bug occurs right after a software update.
After I restarted the computer , "Brackets" worked just fine.

I have tried deleting extensions but doesn't make a difference, I have to restart brackets to get it workings. sometimes it's document specific, after the first save the undo won't work however on a different document it's back to normal. I have tested with 2 files I work on and it works on one and not the other.

It's been happening to me too. This is a BIG issue.

it is a very annoying problem which might lead to use another text editor

Today, I decided to give Brackets 1.7 a try. Within a 1/2 hour I had lost
code due to Ctrl-Z not working. I was perhaps the 2nd or 3rd person to
report this bug back in Nov. Not to have it fixed by now is rather an
amazing thing.

I'm surprised that Adobe's management has given the green light to using
this technology for upcoming versions of Dreamweaver. Perhaps the reason
this bug has not been fixed is because either the developer tools are not
robust enough to track this down, or the technology which Brackets is using
is not up to the task.

In any event, my feeling is, at this point, keeping Brackets available for
general use is doing damage to the Adobe brand.

On Sat, Jun 18, 2016 at 8:32 AM, tansiner [email protected] wrote:

it is a very annoying problem which might lead to use another text editor


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/adobe/brackets/issues/11826#issuecomment-226939200,
or mute the thread
https://github.com/notifications/unsubscribe/AGnVyA0-LFHVvAK_n_avUEPp-1Da1Y4vks5qM-VkgaJpZM4GPktK
.

I cannot endure this problem.
Please tell me the editor(Windows 7) as a substitute for Brackets.

@cafelasm you can try atom

Atom is incredible. I switched
  yesterday and configured it to my liking.



  I cannot endure this problem.
    Please tell me the editor(Windows 7) as a substitute for
    Brackets.
  —
    You are receiving this because you commented.
    Reply to this email directly, view
      it on GitHub, or mute
      the thread.











-- 
  Pc.Doc di Daniele Brunengo

  -Creazione e gestione siti internet
  -Grafica pubblicitaria, biglietti da visita, loghi
  -Riparazione ed assemblaggio personal computer
  -Consulenza in campo informatico
  -Assistenza hardware e software

  Sito web: http://www.pcpuntodoc.it
  Facebook: https://www.facebook.com/Brunengo.Daniele
  email: [email protected]
  Tel.: 3296661924

1) Atom
2) Visual Studio Code
3) SublimeText

I am just trying to think if there is a pattern here. Is there a possibility that this problem is occuring with files that are synced with DropBox and edited using Brackets? Can anyone confirm if that is the case?

@nethip In my case it had nothing to do with Dropbox. Files were not being "touched" by anything else than Brackets, not synced via cloud, nothing :/

uh ok! @vlad-saling Thanks for confirming.

I can ensure (at least for my case) it has nothing to do with any cloud service, my files are stored locally. I am just wondering why devs never experience this issue while most of us having this issue? Are the devs did not use bracket at all? :p

@cekpek Our entire team uses Brackets day in day out but not one of us ever ran into this problem. Not even once! And that is what suprises me too.

I am trying to backtrack what @vvks had posted to see if I get any clues. It looks like when this happens, some component is trying to reload contents from disk after save. Reload basically clears the history.

@nethip if it helps, this used to happen to me (past tense since I now use a different editor) on Linux (Ubuntu and Linux mint). Windows did not have this issue (at least I wasn't able to replicate it there). Not sure about OSX.

@nethip I am a windows user ( windows 7) when this bug happened to me. But now i am mac with sublimetext and atom.

@nethip i can confirm this behavior on Windows 7, Windows 10 and Linux

@vlad-saling @cekpek Sorry for getting completely blocked on this issue. Thanks for your inputs.

Thanks @vvks . Will you be able to do a remote session with us? Since we are not able to repro from our side, we would like to debug this issue on a system where this issue persists.

Can someone explain to me this: Why did version 1.7 get released with this bug still present?

Hi All, let us know if anyone can do a remote session with us, so we could debug into this issue.

I've experienced this issue intermittently. Definitely frustrating.

I haven't spent the time to learn how to reliably reproduce it, but I've usually found ways to work around it, such as using git to reset file changes.

If I were on the Brackets team, I can't think of any issue that would be higher priority right now, as ctrl-Z undo functionality is a core function of editing text.

@nethip I'm surprised that the devs have not had this happen to them. Do they keep any consequential libraries in their project folder. My sense is, the problem has to do with either the number of files in the project or the accumulated size of the code files. In my case, I have several open source projects that Brackets is parsing in addition to the 50,000 lines +/- of my own java script code.

I've documented this else where, but I would try adding the following open source projects, even if not used:

Datatables https://datatables.net/
plus various extensions

Bootstrap
jQuery
Wordpress (yes wp has js files)
Highchart http://www.highcharts.com/

I have other libraries as well. Another thought, perhaps the minimized javascript files are causing problems? It seems that Brackets tries to parse those and maybe those causes it to error and clobber some heap?

Since I upgraded to Windows 10, I haven't witnessed this issue. Among other
changes, I have far less projects in the project tree this time around.
Maybe one or the other might help diagnosing the problem.

On Wed, Jun 22, 2016 at 4:39 AM, K-Thompson [email protected]
wrote:

@nethip https://github.com/nethip I'm surprised that the devs have not
had this happen to them. Do they keep any consequential libraries in their
project folder. My sense is, the problem has to do with either the number
of files in the project or the accumulated size of the code files. In my
case, I have several open source projects that Brackets is parsing in
addition to the 50,000 lines +/- of my own java script code.

I've documented this else where, but I would try adding the following open
source projects, even if not used:

Datatables https://datatables.net/
plus various extensions

Bootstrap
jQuery
Wordpress (yes wp has js files)
Highchart http://www.highcharts.com/

I have other libraries as well. Another thought, perhaps the minimized
javascript files are causing problems? It seems that Brackets tries to
parse those and maybe those causes it to error and clobber some heap?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/adobe/brackets/issues/11826#issuecomment-227603962,
or mute the thread
https://github.com/notifications/unsubscribe/AGXgh4YZ4NVuB2pTeTfQnHHlzEulFXAAks5qOHYxgaJpZM4GPktK
.

_Designcise_

Connect with us:

@nethip i won't be able to do a remote session from my work pc but will try replicating the issue on my mac and let you know so that we can have a remote session over the weekend

Sorry, I retract my earlier statement about not witnessing this issue on
Windows 10, just saw it happen randomly.

On Wed, Jun 22, 2016 at 10:30 AM, Vivek [email protected] wrote:

@nethip https://github.com/nethip i won't be able to do a remote
session from my work pc but will try it on my mac and let you know so that
we can have a remote session over the weekend


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/adobe/brackets/issues/11826#issuecomment-227647435,
or mute the thread
https://github.com/notifications/unsubscribe/AGXghxhR0Swb9ZKFExx7n6JKFi9gHPyiks5qOMh-gaJpZM4GPktK
.

_Designcise_

Connect with us:

Still facing this issue.

Also having this issue. It's extremely annoying...
Brackets Release 1.7 build 1.7.0-16898 (release b0a363b71)
Windows 10 Enterprise Insider Preview 14366

since switching to the earlier version (1.3), that problem has never occurred by now!

Sure @vvks!

fix was pending but it is now in 1.7 and it obviously doesn't fix the issue, although it seems to happen less often for some reason.

@tansiner you can go to 1.4 if you want, it doesn't have this issue either.

thanks @vankasteelj...

running 1.7 on win10 64 - this issue just happened to me (already the second time in a week). I then restarted Brackets and everything was back to normal, so I cant really reproduce.
This is very bad, I rely a lot on my undo history, it's VERY important to me as I could lose big pieces of code I was just trying to replace as a test or another thousand reasons.

I do appreciate the work these guys do but this bug is as dangerous as a bsod and could easily lead to a huge loss in terms of time, money and patience.

I have reinstalled Brackets and have only installed 1 extension, even with it disabled the error persists. Currently the issue is occurring on php files, it's getting to the point where I'm going to have to look for another editor.

10845 and #985

Has anybody bothered to check out the issues above? They seem related, the solution for the former was to uncheck "Clear whitespace on file save" on the brackets-git extension (fixed it for me too).

Now this thread says people experience this issue also with all extensions disabled, so there must be running something, anything, else that touches the file in the background. Doesn't have to be related to Brackets at all.

I totally agree with zaggino's view that this is a core issue. Instead of searching for the culprit that dared touch a file while it was open in Brackets, a different approach is necessary to determine when the undo history should be reset.

SO i believe i have found the way to replicate the issue with the CTRL + Z after a save.
i will list addons i am using ( version 1.7 brackets fresh install)
Beautify
Brackets File Tree
Brackets Git
Brackets Icons
Documents Toolbar
Extensions Rating
Monokai Dark Soda (theme)


i'm currently working on a big project with angularjs, using node and gulp.
the issue as i have noticed is as follows:

  1. open a file (any will do as it happens on html, js, css etc..) with code already in it.
  2. edit the code (add a 1 or w.e you would like)
  3. save once and brackets will hold on to your change.
    (say you added a 1 and saved, now you add a 2 and 3, and save, it will keep your ctrl + z, BUT the moment you save + ctrlZ + save again, GOOD BYE CODE.)
  4. use Ctrl + z and it should go back to what was.
  5. save again and you will now realize that your undo history is gone, in otherwords your ctrl+z is no longer going back to what was.( i think brackets thinks that since you used ctrl + z and saved again that it was what it used to be so theres no need to track your undo history any longer or something like that.)

i hope this will help in solving the issue.

Gio Capetini

PS. i also think that instead of going back using the ctrl + z, they gave it to the ctrl + y, as i've tested it seems like ctrl + y brings back what would come back if we used the ctrl + z. almost as if it switched places.

Dear Brackets dev team, you're losing many of your users, as this thread is proving right now. I've repeated myself before, and for your sake, I will do it one more time.

Disable ALL functionaly that leads to clearing the undo history!

Too much history is ALWAYS better than not enough.

Just as a workaround. And release it as a hotfix on the current release!
Then you can sit back and really fix this issue. And then, you can NOT RELEASE ANYTHING until it's fixed. Really guys, that was not cool. To spew out releases with this devastating bug knowingly still in it.

Take my advice. It's the least damaging thing to do at this point.

@nethip sorry, I tried recreating it on my personal device but have been unable to recreate it (even though i have the same extensions)

i'll continue trying and let you know asap..

@vvks No problem! thanks for trying it out. Since I am not able to repro this at from my end, I would instrument some logs and push those changes to a branch. Will you be able to run Brackets from that Branch?

yes, sure. please let me know about the branch

Lost another block of code due to ctrl-z suddenly not working. I'm a big fan of brackets but this is getting out of hand. Please, team brackets...please have this fix. I'm going to switch to Visual Code till this is fixed.

Still facing this issue, it's very annoying...

Any news on an upcoming fix? This has been happening to me for a few weeks now.

This issue exist for a while now and it's very annoying.
Any solution to avoid it?

it disappears after relaunching brackets but come again after some time.

With the last release of Brackets (1.7, June 8), the problem went away for me. But today, it resurfaced. I thought it might have something to do with syncing software like git or box. Not the culprit. :(

For what it's worth I haven't ran into this issue myself at all after #12175 was merged on multiple systems (Windows 8.1, Windows 10, MacOS)

As always, if you are running into this issue, please also post the extensions, versions and platforms you are using Brackets on, for example by posting the Health Report under Help -> Health Report.

For example brackets-git has an known issue of nuking the history (as described on https://github.com/zaggino/brackets-git/issues/1274).

Thanks.

How to reproduce the bug - always!

  1. Open Brackets
  2. Open a file in Brackets
  3. Type: a
  4. Save
  5. Ctrl-Z
  6. Type: b
  7. Ctrl-Z
  8. Ctrl-Z ===> NOT WORKING!!

@scopolamin Like I said, that obviously doesn't occur to everyone, including myself. That's why the Health Report and possible errors in developer console are essential on debugging the matter.

Its doesnt appear immediately for me but after few hours.

Im working under linux with brackets 1.6 (but the issue was also in 1.7) and without git plugin.

Next time i will do a health report

@petetnt
I tested this on tree different Systems: Linux Mint, Windows 7, Windows 10
It happens always and on the first try (with and without extensions disabled).

But maybe it's a question about the "expected behavior"?
Maybe you just expect a differend behavior then the users in this thread?
So again, with some comment:

1.Open Brackets
2.Open a file in Brackets
3.Type: a
4.Save
5.Ctrl-Z ===> Should remove the "a"; Will remove the "a"
6.Type: b
7.Ctrl-Z ===> Should remove the "b"; Will remove the "b"
8.Ctrl-Z ===> Should show the "a" again; Will do nothing at all

inspector
inspector2

@scopalamin That's actually how the editing should work. After you type a, the history stack is [a]. When you undo it, the history stack is []. When you type b, the stack is [b]. When undo that, the stack is empty again -> [].

However, if you instead just remove the character, the stack will look like this:

[a, backspace, b]

In which case the history will work as b -> empty -> a.

@petetnt
Sure, makes sense! Seems like my "sample" was just a "juhu, I found a working sample" while I messed up with the logic. Sorry.

Agreed with @petetnt

In my case, i do modification on the file and next do a ctrl+s. But it seems that the history stack is empty after this because nothing happen if i do a ctrl+z after.

I hope that i will be able to provide a log soon

I am thinking of some test scenarios to get to the root of the problem. Will anyone be able to try some steps that I had outlined below.

  • Disable Node temporarily and work in that mode for a while. This is to rule out if any node related feature(s) is causing this failure. On _Windows/Linux_ you could go to the installed folder location and rename node-core to something like node-core-disabled. On Mac bring up the context menu, choose _Show Package Contents_, browse to Contents/node-core and rename this folder to node-core-disabled. Once done, please continue to work in this mode and let us know if you are seeing this problem. Note: Because Node is disabled, you might not be able to use features like _Find In Files_, _Extension Manager_. For _Find In Files_, you could get our legacy search by disabling findInFiles.instantSearch: false, findInFiles.nodeSearch: false.

Also it would be great if anyone can give us any information on the following.

  • When this problem is encountered, does the Working Files should duplicate entries for the same file, that is being edited?
  • Was _Find In Files_ used before this problem surfaces?

@nethip i can confirm (at least on my case) that i am not using Find In Files when this problem occur.

@cekpek Thanks for confirming. Did you get a chance to look at the Working Files to see any duplicate entries?

@cekpek Also could you follow the steps above to disable node related features and check if this happens again?

@nethip as for the duplicate entries, i am not too sure, as far as i remembered, the last time i lost my code was the entire controller code of angular apps, so i am assuming there is no duplicate controller in the Working File. I will try to disabled the node the next time i code using Brackets (as i have move to sublime text right now).

Still having this problem every other day. :(

my health report:

{
    "uuid": "95028d3c-9239-48ed-afef-58c1f867814b",
    "snapshotTime": 1469035758604,
    "os": "linux",
    "userAgent": "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.80 Safari/537.36",
    "osLanguage": "en",
    "bracketsLanguage": "en",
    "bracketsVersion": "1.6.0-16680",
    "fileStats": {
        "openedFileExt": {
            "c": 107,
            "h": 26
        },
        "workingSetFileExt": {
            "c": 7
        }
    },
    "searchDetails": {
        "searchNew": 5,
        "searchOnReturnKey": 2,
        "searchInstant": 7
    },
    "projectLoadTimes": "",
    "fileOpenTimes": ":0(0)1[1]:0(1)1[1]:1(1)1[0]:0(1)1[1]:0(1)1[1]:1:1:1:0:1:0:1:0:0(0)1[1]:1:0:1:1(1)1[0]:0(1)1[1]:1:0:0(0)1[1]:1:1:1",
    "prefNodeSearchDisabled": false,
    "prefInstantSearchDisabled": false,
    "installedExtensions": [
        {
            "name": "brackets-zw",
            "version": "0.1.1"
        },
        {
            "name": "bigeyex.brackets-wordhint",
            "version": "1.0.2"
        },
        {
            "name": "brackets-shizimily-multiencoding",
            "version": "0.0.8"
        },
        {
            "name": "dkehrig.show-whitespace",
            "version": "2.0.1"
        },
        {
            "name": "highlight-element",
            "version": "0.0.4"
        },
        {
            "name": "enturn.quick-search",
            "version": "1.1.4"
        },
        {
            "name": "edc.brackets-snippets",
            "version": "1.8.1"
        },
        {
            "name": "dnbard.extensions-rating",
            "version": "0.7.4"
        },
        {
            "name": "mikaeljorhult.brackets-todo",
            "version": "0.8.1"
        },
        {
            "name": "fede91.brackets-preferences-ui",
            "version": "1.4.0"
        },
        {
            "name": "ovk.brackets-simple-todo",
            "version": "0.1.5"
        }
    ]
}

(edited by @MarcelGerber for legibility)

@nethip I have been using brackets with node-core disabled for the last couple of days and haven't encountered the issue since.

NOTE: I am not sure whether it is because node-core is disabled or because of the nature of the bug (as it has no STR). I'll continue using brackets this way for sometime to be sure.

EDIT: Can confirm that the bug has gone after disabling node-core
cc: @nethip

Sorry for the late reply @vvks. Thanks for helping! Really appreciate it. I will check to see what has gone into node-core between 1.4 - 1.5

@nethip So that's it! I used 1.5 installer to install brackets and can't save. But if I use 1.4 installer and manually update js to 1.5 release commit, no bug is encountered.

I would love to use git in brackets but the plugin always causes this issue for me.
Is this currently being fixed?

Release 1.7 build 1.7.0-16898 (release b0a363b71) build timestamp: Wed Jun 08 2016 04:20:22 GMT-0700

@blackmiaool Thanks for experimenting and letting us know! I am checking at the commit history of node-core and nothing much seem have gone into this folder between 1.4 - 1.5. It could be combination of other factors. Could you do the following steps.

  • Make a copy of node-core, that got copied while installing 1.4
  • Install Brackets 1.6
  • rename the node-core folder and copy node-core folder, that was backed up in the first step
  • Check if this issue is happening

Really appreciate your help!

@nethip I don't know why but no bug is encountered after installing 1.6. And I found no difference between 1.6's node-core and 1.4's node-core. They are both 131.3KB. Maybe I need more time to experiment.

@blackmiaool this happens in 1.7 for me.

1.7 same issue

This should be fixed in 1.8 by https://github.com/adobe/brackets/pull/12681

That would be very cool indeed. But please do excuse my scepticism until then 😇

Could you explain briefly what the problem turned out to be, @zaggino? I suppose some of us would be dying to know 😃

In the issue that I've been able to replicate, file system invoked a change event over a file which had newer timestamp than the file in Brackets, so Brackets reloaded a content of that file (because there were no unsaved changes in the editor). There was no safe-guard in place that the modified file is actually still the same file (contents were equal). Fix is that, in a case of same text content, no reload is done and no history is cleaned.

Why would the filesystem do such a thing? Especially considering this bug existed on multiple platforms, and therefore multiple different filesystems...

filesystem could be node const filesystem = require('fs'); which is multiplatform.

@thany It's an underlying issue with file IO and race conditions, on how CodeMirror handles resetText and its history and how all that is implemented in CEF / Brackets Shell and finally Brackets.

TL;DR: It's pretty complex. See the longer messages I have written above which outline most of that.

I confirm with disabling node-cores the problem is fixed.

@vahid-sanati Thanks for trying! @zaggino had made a fix in this area.

Could you run Brackets from source and tell us if you are still seeing this issue? Here is the guide to how to run Brackets from source, with the latest _master_. https://github.com/adobe/brackets/wiki/How-to-Hack-on-Brackets

@vvks It would be great if you can try running Brackets from source with the latest _master_

I can confirm that undo/redo is not working (V. 1.7) on Debian 64Bit!

@devarni please try Electron build https://github.com/zaggino/brackets-electron/releases

@zaggino Yes, thanks, With this build undo/redo is working!
Does it need to reinstall all extensions or it's enough to copy the user folder with the extensions?

@devarni You can safely copy extensions; if some of them misbehave try reinstalling them; if doesn't help open an issue at https://github.com/zaggino/brackets-electron/issues

@nethip i have been running Brackets from source with the latest master and haven't encountered the issue. thank you..

I'm with @thany. This has pushed me to another editor altogether. This is a core feature. Not even a feature at that. A necessity.

This happens for me on 1.7 btw

@petetnt do you have the git plugin installed? That's what causes the undo to break for me

@mdxprograms I don't, but I outlined the issue in https://github.com/zaggino/brackets-git/issues/1274 in january.

It might be fixed in the current master though already with #12681. If you could try that out, see https://github.com/adobe/brackets/wiki/How-to-Hack-on-Brackets

@vvks Thanks for confirming. This is relieving for sure!

@mdxprograms As @petetnt had suggested, could you try running Brackets from source to see if you are still seeing this issue?

@nethip sure thing. I'll give it a go tomorrow morning.

confirming on win10 64x undo redo not working even after removing extensions version 1.7

this will be fixed in next (1.8) release of brackets which is up to adobe to release;
in the meantime you can use brackets-electron where this has been already fixed

Also having the same issue.

Release 1.7 build 1.7.0-16898 (release b0a363b71)
Win 10 x64

Today Ctrl-Z bug has occurred many times in my SCSS. The larger the file the more often.
After saving - no way back :/

@Rafiozoo do you have an SCSS processor extension in Brackets?

@dedicatedmedia @Rafiozoo can you test the latest master and see if the problem still occurs.

@petetnt Yes Brackets Sass

@dedicatedmedia @Rafiozoo you can now try pre-release of Brackets 1.8 to see whether this is fixed: https://github.com/adobe/brackets/releases/tag/release-1.8-prerelease1

I had this issue on Release 1.8 build 1.8.0-17080 (using on Windows 10). After saving the file, ctrl+z wasn't working, and oddly enough it kept scrolling to the top of the document instead.

@designcise can you post your Help -> Health Report? Can you repeat the issue? Do you see any errors in the console? Does this occur without extensions?

@petetnt I only started using Release 1.8 build 1.8.0-17080 day before yesterday, if I witness this issue again, I'll keep those things in mind. Right now, I'm not sure how to reproduce this issue. Health report (this snapshot was created after I witnessed the issue and closed and restarted Brackets, which seemed to resolve it for now):

{
    "uuid": "769518fa-bf57-4376-9cee-4726d9f7109f",
    "snapshotTime": 1474634485600,
    "os": "win",
    "userAgent": "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Brackets/1.8.0.0 Chrome/49.0.2623.110 Safari/537.36",
    "osLanguage": "en-US",
    "bracketsLanguage": "en-US",
    "bracketsVersion": "1.8.0-17080",
    "fileStats": {
    "openedFileExt": {
        "tpl": 3,
        "php": 53
    },
    "workingSetFileExt": {
        "tpl": 1,
        "php": 14
    }
},
"searchDetails": {
    "searchNew": 2,
    "searchOnReturnKey": 2,
    "searchInstant": 4
},
"projectLoadTimes": "",
"fileOpenTimes": ":89(100)111[11]:76(88)105[11]:83:76(79)81[2]:71(79)87[6]:65(68)72[3]:73(115)184[49]:92(139)185[47]:64(104)143[40]:72(110)148[38]",
"prefNodeSearchDisabled": false,
"prefInstantSearchDisabled": false,
"installedExtensions": [
    {
        "name": "new-window",
        "version": "0.0.1"
    },
    {
        "name": "brackets-console",
        "version": "1.4.1"
    }
],
"bracketsTheme": "dark-theme"
}

Same issue here, impossible to work like that :( tried debug > reload without extension, problem is the same with no extension, it happen when i save and change windows (exemple going to my browser) then when i go back to brackets, impossible to undo...

@crashbdx are you using version 1.8 from https://github.com/adobe/brackets/releases ?

@zaggino no im in 1.7, if i use a pre realease will all my extension still work ?

@crashbdx yes, they will continue to work. You should be able to safely upgrade to pre-release as you would do with normal release. Let us know if you still experience the issue in 1.8

@crashbdx they will. Could you also post any errors you might see in Debug -> Developer Tools -> Console.

Ok, seem to work well with the 1.8, i'll let you know if the problem show up again, thank you.

@zaggino I've using 1.8 for a few days now. I haven't encountered this bug.

Thanks!

I'm using 1.8, build 1.8.0-17080, on Windows 10 x64, and have just encountered this bug again. Selecting Debug -> Restart Node fixed it.

Since using version 1.8 pre-release I haven't faced this problem anymore!

Just encountered the problem right after posting my previous comment. for almost 10 days of using v1.8 I wasn't faced the problem.

Encountering the issue after 10 days is a bit weird. Can you provide your list of extensions @vahid-sanati ?

@zaggino In those 10 days I was working on a project and there was no problem. then switched to another project and faced the problem at my first attempt to undo after my first save of the modified file. I guess changing the project caused the problem to appear.

about the extensions, I'm using almost 35 extension but in v1.7 I tried without them and the problem was still there. so I guess they don't affect this. and also I haven't updated them since using v1.8.

Funny @vahid-sanati mentioned this happened when he switched from one project to another, come to think of it, I witnessed this issue (about 2 days into using 1.8) exactly when I switched from one project to another. Maybe that's a starting point for diagnosing this issue?

I'm now encountering this far more frequently, while working a project that is being served with gulp-live-server, for some reason. When I work on a project that is served with a plain Apache instance, the problem goes almost unnoticed.

I'm not sure if this is related, but it does stand out to me.

Can you share your project on github @thany or somewhere?

Bug randomly show up again even with 1.8 for me.

@zaggino It will be on github in a while, but now is not the right time for that, sorry.

That's ok, but if we're not able to replicate it, we probably won't be able to fix it. It certainly doesn't happen to me anymore in daily usage.

I'm guessing you're not using 1.7, but a pre-release. I'll switch to and try 1.8 when it comes out.

For me it happen with any kind of project not a specific one, it is pretty random, ether with 1.7 or pre release 1.8, very difficult to keep working with it sadly :(

If you use brackets beautify (https://github.com/brackets-beautify/brackets-beautify#usage) you should try turning Beautify on Save feature off. Any other extensions which do things after save can possibly be causing this issue too.

I had this problem on 1.7 constantly. I haven't seen the behavior again since getting 1.8 two days ago.

can not believe this issue is not fixed over a year, 1.5 not working, 1.6 not working, 1.7 not working, 1.8 not working

This is how you launch Brackets from the source: https://github.com/adobe/brackets/wiki/How-to-Hack-on-Brackets

It'd be useful if you could debug what is causing your problem, it's very hard to fix problems which are not happening on every machine and are specific to system configuration, extensions, etc.

I'm repeating what I said a year ago, it isn't linked to extensions. System configuration might be on point, but I doubt it, it rather seems linked to the workflow and type of projects : I'm confident anybody can reproduce this, if they use they application daily, for production.

Note: I'm using from source since about 6 months (core installer 1.6, no extract, and update regularly of the sources, currently stuck at 300f3d0b67), and I don't recall seeing the issue. However, I don't code as much as I used to when I opened this ticket

@vankasteelj I've found one case which I could replicate and fixed that in master. It's available in 1.8 pre-release or brackets-electron 1.8.4 . Unless someone actually contributes with a scenario how to replicate this with 1.8 or debugs this issue on his machine, this won't move anywhere.

I just faced a scenario that may help finding the source of this issue. I was working on a file and had some custom regions of my code folded. I hit the save button and all my foldings expanded right after. Then I checked and yes, there was no undo anymore. It seems like file is closed and reopened. because closing the file makes custom folded areas reset for me every time (don't know if it is a bug of folding or it's supposed to work that way). any way the file is like closed and reopened after save and this should give you a clue.

Yes, @vahid-sanati what happens in latest master is that something external (or an extension using external approach) modifies the file after it's being saved by Brackets. It is in steps like this:

1) Brackets saves a file.
2) Someone (extension, external program) picks up save event and modifies the file (for example whitespace cleanup, making line-endings consistent, whatever)
3) Brackets get notified about a file modification, so it reads the file from the disk.
4) If the content of the file has changed (before my fix in 1.8 this check was not present and Brackets would get notified also about saves that didn't change anything, just the file timestamp) Brackets will reload the file and discard the history.

So there are two questions here:
a) What is actually touching your files while you're working with them in Brackets? I use Brackets about 90% of my day job 40 hrs a week and I never run into this issue. Claims that anybody can reproduce this if they use the application daily are a bit off.
b) Should we actually drop history when an external modification happens? Maybe we shouldn't and we should just record it as another history step. But that will of course lead to another problems such as users not understanding why undo contains a step that they didn't do.

well good news. I finally got a situation that this issue always was happening. then begin testing my extensions one by one and find out by disabling an extension named CloseAllOpenFiles the problem is not happening.

I tried to debug the extension and find the line AppInit.extensionsLoaded(removeViewState); was causing the problem. but the interesting thing is that the removeViewState function was not what caused problem. because when I replaced it with just a simple alert function function(){ alert('test'); } the issue happened again. only when using AppInit.extensionsLoaded(); without any function passed to it the problem was not happening! So I guess passing any function to the AppInit.extensionsLoaded causes something that reloads the file when its saved.

Thanks for the effort @vahid-sanati ! I'll have a look at that extension as soon as I can to see if it's something that we can fix in the core.

Using the latest 1.8 release and the problem still there. I Can now reproduce the problem even without any extension installed! seems like it's getting worse by each update! I've spend my entire day to find what is causing this and what I find out is:

  1. the problem happens only to files that are inside a folder in the project root. the files that are in root folder are OK!
  2. If you make change to a file but don't close the file before closing brackets, the undo works on that file after next time you launch brackets. But if you close the file first then close the brackets, problem occurs for sure!
  3. The undo history is always lost on second attempt to save! I mean you make your first changes and save and every thing is fine. You make another change and save and undo is lost!

when I follow this scenario the problem always occurs:

a) Create a folder named "project"
b) Create another folder inside the project folder named "innerfolder"
c) Create a .php file inside "innerfolder"
d) Open the file and write something and save, write again something and save again
e) Close the file from working files section (Important)
f) Close brackets
g) Open brackets and open the file
h) Write something and save, write again something and save again, do same one more time (to make sure problem happens)
i) You have lost the undo history

The above steps always gives me the problem.

No extensions installed. Fresh install of latest brackets Release 1.8 build 1.8.0-17101
Windows 10 1607 x64.

I encountered the issue with the undo history again twice today, but I cannot reproduce it using your described method. I'm starting to think that bug only occurs while you work, and suddently disappears when you try to find it (classic volkswagen case!)

I say postpone 1.8 until this is resolved

This issue has been going on for WAAAAAAAY too long, and causes loss of work, happens across all platforms, across many different types of users, and therefor should ab-so-lute-ly be fixed before any release.

Have to agree with @thany here. I use brackets daily and generally love it.
But this issue needs to be fixed. It's got me on the edge of switching
editors numerous times. Don't need or care about a new version until this
is fixed.

On Fri, Oct 28, 2016 at 3:48 PM, thany [email protected] wrote:

I say _postpone 1.8 until this is resolved_

This issue has been going on for WAAAAAAAY too long, and causes loss of
work, happens across all platforms, across many different types of users,
and therefor should ab-so-lute-ly be fixed before any release.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/adobe/brackets/issues/11826#issuecomment-257046754,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABZgfXLN20PzYZ19z-de7gi5hwHWdpljks5q4nvIgaJpZM4GPktK
.


Tony Brasunas // Senior Software Engineer
O 510-740-2766
C 415-647-8587
E [email protected]
Sungevity // Generate Positive // 66 Franklin Street, Oakland, CA 94607

http://www.linkedin.com/company/sungevity/products

I don't understand how postponing 1.8 would help. We fixed at least one scenario of this in 1.8, although it's quite clear that not all. I've tried steps by @vahid-sanati and I can't replicate this on two windows 10 machines that I daily use. I can guarantee that if we'd be able to replicate this, it'd be fixed shortly after.

I tried that method in my lap top which is windows 10 32-bit and like you said the problem didn't show up. but somehow that steps produce the problem in my desktop PC. my guess is that 2 events are firing in the same time and on the low end systems there is enough delay to do the job properly but in high end systems it happens too fast and they interfere with each other (I mean event 2 is not waiting properly for event 1 to be done) and that makes the brackets to behave differently on each system. for example event 1 attempts to save file and event 2 checks the file save before the file completely is saved on disk then file save completes and it assumed to be an external change.

Postponing 1.8 gives you (as the developers) an incentive to get this problem fixed for once. Also it's a problem more than bad enough that it MUST NOT occur in the next release. It's too critical. As a result, you may loose even more users to Atom.

Put simply, you can't afford to have this bug in 1.8.

Please also remind yourself that this issue has been around for over a year. You can't keep releasing new versions with a straight face while having a bug that causes data loss - I cannot stress that enough. How would you get those folks using Atom, back to Brackets? You can't - they don't trust Brackets anymore. And frankly I can't blame them.

i too would agree on postponing 1.8 till this bug is fixed because this is by far the most critical bug, and I too have witnessed it on a number of occasions. Although I have not been able to successfully reproduce it, I was able to notice that it had something to do with code-folding; at certain occasions while saving, all folded panes are unfolded and the ability to undo is lost. Once it happens, the problem can be reproduced several times, unless 1) you recreate that file; 2) rename that file; 3) restart brackets.

@designcise It is not related to code folding. It reads file from disk again and that's what makes folded areas expand as well as undo lose. Your description of problem is very similar to mine. maybe you can reproduce the problem with steps I wrote few comments above!

All I can add right now, is that it happens while working, which means:

  • in-file research
  • project search
  • undo/redo
  • git commit, from console

@zaggino maybe you could release a special patch with a lot of logging from history, this way when the issue happens again, I can check the console for complete information.

EDIT: I just encountered the issue again, here's what the console says:
brackets_2016-10-29_22-19-15

@vankasteelj and others
if you're able to run from source (guide to that here https://github.com/adobe/brackets/wiki/How-to-Hack-on-Brackets) you can just edit the source and put some console logging into the Editor.prototype._resetText function. See my PR here: https://github.com/adobe/brackets/pull/12681/files which fixed the events when file was reset with the text having the same value as the file. This fix will be shipped with 1.8. You can put something like this there:

if (text !== currentText) {
  console.log('undo history was cleared because external change modified the text from ' + currentText + ' to ' + text);
}

Just remove ALL history nuking. Problem solved.

Having a bit too much history is a billion times better than losing all of it at unpredictable times.

@zaggino Well I have tested this log and result is interesting! I find out that this problem only happens when there is multiple lines in the file. when I write in just 1 line and save I can undo. but the moment I press enter and write anything and save the undo is lost. again deleting and making the same file 1 line and save, the undo is come back (containing just the last step of course)! I think we've found the problem. it's the new line character!

log with new line character at end:

undo history was cleared because external change modified the text from "sample text
" to "sample text
"

2nd try:
same result. with just 1 line undo works fine. once i press enter and save it's gone.

log with new line character in middle:

undo history was cleared because external change modified the text from "sample text
sample text" to "sample text
sample text"

The second interesting thing is after saving multiple times this message came up it never happened before (no external change is made and no extension is installed):

untitled

All tests done with no extension installed.

@thany That might sound like a good idea at first, but there's tons of situations where resetting the undo history is very much wanted effect, such as when files endures outside changes (and thus editor cannot be sure if the document history is valid or not). If losing the undo history sounds bad, try a situation where undoing actively destroys your document from unexpected places.

(For example, my extension https://github.com/petetnt/brackets-persistent-history diffs the files between loads to ensure that the document hasn't changed and even doing that between loads is a bit filesystem intensive).

guys I was right about the new line character! I played a little with the logging and this is my result:

I changed the code @zaggino mentioned to this one:

if (text !== currentText) {
  console.log(currentText.length);
  console.log(text.length);
}

and the result is interesting!

with this text in file:

test

the log is:

9 (currentText)
10 (text)

when entering one new line between 2 lines:

test

the log is:

10 (currentText)
12 (text)

and for 2 new lines:

test

the log is:

11 (currentText)
14 (text)

this is obvious that new line is one character in currentText but it becomes 2 characters in text.
this is why text is not equal to currentText technically and causes the file and history reset.
maybe this is related to file encoding?

Found Solution!!!
just modified these 2 variables in the Editor.prototype._resetText function and it totally fixed the problem.

added before any other code inside function:
text = text.replace(/(?:\r\n|\r|\n)/g, "\r\n");

and modified currentText definition to this one:
var currentText = this._codeMirror.getValue().replace(/(?:\r\n|\r|\n)/g, "\r\n");

Bye Bye undo reset!

Edit : The solution works great and after lots of tests I didn't faced the problem anymore even once. But this solution only makes text comparison properly detect the difference and the fact that the new lines of the saved code is different than the new lines of the code in the editor still remains and developers should take care of that!

Bravo @vahid-sanati! Now let's see if this fixes the issue for others as well.

So what we have here is that line-endings of the original file are different than line-endings that are put into the file, when save has been made. I think we can fix this quickly for 1.8 cc @ficristo @petetnt

That's pretty interesting @vahid-sanati, great job. I always have normalized line-endings, which explains why I (and many others) never run into that particular issue.

Another fix for 1.8. sounds good to me, create a PR and aim it towards release branch.

Again, great job 👍

thank you @petetnt @zaggino and all other developers for your great application. I love brackets and I just didn't want to give up on it.
I'm glad I could help you fix this issue.

Thanks ! I applied the patch from the PR, let's give it a run on the next few days :)

_Note: quick reminder, follow this guide, download this patch, and apply it with:_ git apply 12865.diff _Once the PR gets merged, to get back on track, do:_ git stash && git pull

@vankasteelj tested and works fine.

Edit: separated the external changes dialog issue.

@vahid-sanati that external changes dialog should be treated as a separate issue outside of this, please open a new issue and copy-paste there how you're able to replicate it, thanks

I'm working on a PHP project right now, and undo doesn't works after save _every single time_. It's completely reproducible.

Just thought you might like to know.

But again, just remove history nuking alltogether for now - we'll be better off without it if this bug can't be fixed. I'll keep repeating this, jsyk.

@thany Please read @vahid-sanati's comments above and try the same thing he did to figure out what is the problem on his machine. Otherwise, your comments are quite useless.

Why is removing history nuking alltogether not an option?

How is it better to lose work, than to have a little bit too much of it?

Besides, if the bug is fixed, as the comment implies, put out a maintenance release! No need to wait another couple of months until 1.9 is "ready".

I haven't encountered the issue in the previous days, and i've been pretty busy coding on brackets :) it's a good sign so far

@thany if you haven't applied the fix #12865 of course the problem will still happen to you. the final 1.8 release will have the fix. apply the patch or wait for the final release. If you don't want to work with source you can edit main.js file inside the install directory of brackets to apply the fix (actually I did all my tests with this method, never tried the source) but you should be careful with escaped characters!

This should have been fixed for a while now, if this pops up ever again, please do open a new issue so that it can be addressed immediately.

Was this page helpful?
0 / 5 - 0 ratings