This repository has been archived by the owner on Sep 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Remember selection/cursor and scroll position per file #2898
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sessions, and of ALL files within a single session. Simplify how DocumentManager saves working set state via a new "beforeAppClose event". There's one ugly bit, a hack in EditorManager. _restoreEditorViewState() to get around some CM API fragility. Also save & restore scroll pos more precisely in Quick Open when user closes it via Esc. Remove some vestiges of the very early, incomplete & disabled code that dynamically previewed documents as you type. Plus small cleanup in ModalBar for clarity.
…oll-pos * origin/master: (236 commits) Update README.md Update README.md Update README.md Clarified comment Change string literals for resizeEditor() arg to constants Cleaned up refresh code and made it so we always refresh after showing the editor. Addresses some cases in #2782. Update CodeMirror SHA. For real this time. Update CodeMirror SHA Update CodeMirror SHA to brackets-sprint20 branch, which contains a temporary cherry-pick of a fix from upstream and avoids other fixes we don't want yet. Update CONTRIBUTING.md fix exception when opening empty folder and file open Remove extra divider from help menu. Reverting to old screenshot since the styling of the new screenshot doesn't match the (reverted) background. Updated de to match en Getting Started CSS dimgray background Turn off newline creation when autoclosing tags Set text cursor. Update comments. Only skip refresh if the width hasn't changed prettied it up a bit ... Conflicts: src/editor/EditorManager.js src/search/QuickOpen.js
ghost
assigned jasonsanjose
Feb 19, 2013
Reviewing |
// Give everyone a chance to save their state - but don't let any problems block | ||
// us from quitting | ||
try { | ||
$(ProjectManager).trigger("beforeAppClose"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm guessing this should be triggerHandler
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops, yep. I think the two behave the same in cases like this, but all our other code has clearly standardized on trigger()...
Looks good. Mostly minor comments. |
… fix Closure docs typo.
@jasonsanjose: changes pushed |
Looks good. Merging. |
jasonsanjose
added a commit
that referenced
this pull request
Feb 20, 2013
Remember selection/cursor and scroll position per file
Sweet, thanks for the review! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This implements three related pieces of functionality:
In the process, I've added a "beforeAppClose" event and cleaned up the way DocumentManager persists info about the working set. Instead of listening to a wide variety of events (and using a guard flag to ignore cases where the events are spurious due to project switching), it now listens to "beforeAppClose".
There are two things that are a little unclean: