Commit Graph

915 Commits

Author SHA1 Message Date
Corey Johnson & Nathan Sobo
4ca75b02c5 Move-dialog overlays the bottom of the RootView instead of appearing next to the element 2012-04-27 10:39:55 -06:00
Corey Johnson
0a39ca25a9 Pressing 'm' in tree view brings up a move dialog 2012-04-26 17:12:56 -07:00
Nathan Sobo
f37017b94c Test that removing a file updates the view for its containing directory in the TreeView 2012-04-26 15:59:42 -06:00
Nathan Sobo
47c013f817 After each spec runs, make sure there are no subscriptions on directories (which would leak memory) 2012-04-26 15:54:54 -06:00
Nathan Sobo
fb6a967a18 EventEmitter.off with no args removes all subscriptions 2012-04-26 15:54:12 -06:00
Nathan Sobo
5996233d96 Un-F 2012-04-26 13:03:54 -06:00
Nathan Sobo
8425fb8d84 When a directory view is collapsed, unwatch its directory and those of all descendant expanded directory views. 2012-04-26 13:00:48 -06:00
Nathan Sobo
cd7c1e970f Fix spec that wasn't actually testing anything 2012-04-26 12:38:52 -06:00
Nathan Sobo
d6f5a5631c If temporary file is present in beforeEach, wait 20ms after deleting it to ensure the add event fires 2012-04-26 12:20:18 -06:00
Nathan Sobo
05bcd3e5e0 Fix EventEmitter… need to wait until after the loop to return! 2012-04-26 11:59:47 -06:00
Nathan Sobo
5156a37471 WIP: Tree view spec isn't there yet 2012-04-26 09:32:49 -06:00
Nathan Sobo
5c057e11b1 Make unwatchPath spec make a valid negative assertion and return the watchId from $native.watchPath 2012-04-25 20:14:35 -06:00
Corey Johnson & Nathan Sobo
3ac49e1cd5 add $native.unwatch(path, id) 2012-04-25 18:03:51 -07:00
Corey Johnson & Nathan Sobo
54d869c52e Add Directory spec 2012-04-25 17:38:33 -06:00
Corey Johnson & Nathan Sobo
5aed1b012a PathWatcher executes callback when path is changed 2012-04-25 13:49:53 -07:00
Corey Johnson & Nathan Sobo
3f97d98ef9 Start on directory change events 2012-04-25 11:33:44 -06:00
Nathan Sobo
3fe6a699cc Pressing enter in TreeView opens selected file or toggles selected directory 2012-04-24 18:19:24 -06:00
Nathan Sobo
7e7d37859f Right arrow collapses directories in TreeView 2012-04-24 18:08:29 -06:00
Nathan Sobo
48069dc898 Right arrow expands the selected directory in TreeView 2012-04-24 17:31:46 -06:00
Nathan Sobo
9a1d3e00b2 Implement moving-up in tree view 2012-04-24 16:43:51 -06:00
Nathan Sobo
35b68514ed Down-arrow selects the next entry in the file browser, correctly traversing the file hierarchy 2012-04-24 13:58:37 -06:00
Nathan Sobo
2e49f12119 Don't change the selection when expanding directories 2012-04-24 13:13:22 -06:00
Nathan Sobo
dd736ddf67 TreeView directories can be selected by clicking them. Start on keyboard nav. 2012-04-24 12:51:01 -06:00
Nathan Sobo
590352b079 RootView emits an 'active-editor-path-change' event whenever the path of the active editor changes for any reason (buffer path change, new buffer opened, focus changes) 2012-04-24 12:50:00 -06:00
Nathan Sobo
3d382955cc When focus changes to a different editor, highlight its open file in the TreeView
Trigger 'active-editor-path-change' event whenever active editor changes or the path of the active editor changes. Rename 'buffer-path-change' to 'editor-path-change' to emphasize that it's the path open in an *editor* that's changing.
2012-04-24 08:51:11 -06:00
Nathan Sobo
a8e476b505 When the directory containing the current active editor's file is expanded, select the file 2012-04-23 17:28:30 -06:00
Nathan Sobo
dc8a9f090a When a file is clicked in the tree view, it is opened in the active editor 2012-04-23 17:13:05 -06:00
Nathan Sobo
ea6930af54 Expanded/collapsed state of directories is preserved when an ancestor is collapsed 2012-04-23 16:23:57 -06:00
Nathan Sobo
607dfb4987 Expand/collapse directories when their disclosure arrow is clicked 2012-04-23 15:29:16 -06:00
Nathan Sobo
b23785f28f Display directories first in the tree view. Style file names at same indent as directory names (beyond disclosure arrow) 2012-04-23 15:00:11 -06:00
Nathan Sobo
55c78e9550 Start on TreeView. It renders the entries in the current project's root directory. 2012-04-23 14:20:17 -06:00
Nathan Sobo
d204c6f5a8 Don't load user configuration in window specs (who knows what's in there?!) 2012-04-23 14:19:50 -06:00
Nathan Sobo
634a15cfb1 Move extensions into src/extensions directory 2012-04-23 10:54:56 -06:00
Nathan Sobo
89ed9f39f1 Strip only trailing whitespace, not newlines. Also, strip *all* trailing whitespace, not just the first. 2012-04-23 10:33:28 -06:00
Nathan Sobo
802a4259e9 Move-to-first-character-of-line no longer explodes on empty lines 2012-04-20 18:11:01 -06:00
Corey Johnson & Nathan Sobo
a6afc319c6 Mini-editors ignore the 'close' event 2012-04-20 17:59:40 -06:00
Corey Johnson & Nathan Sobo
f652b4e357 Position autocomplete menu above cursor if there isn't room below 2012-04-20 17:18:07 -06:00
Corey Johnson & Nathan Sobo
11c465b7fd Canceling autocomplete restores text and selection, even if selection has changed before cancel 2012-04-20 17:17:50 -06:00
Corey Johnson & Nathan Sobo
9d2b005174 When an autocomplete match is clicked, the match is selected and confirmed 2012-04-20 15:41:31 -06:00
Corey Johnson & Nathan Sobo
f0c36ada89 Don't activate autocomplete on its own mini editor 2012-04-20 15:15:55 -06:00
Corey Johnson & Nathan Sobo
41a5f217a5 Scroll to selected match when moving up/down in autocomplete menu 2012-04-20 14:55:54 -06:00
Corey Johnson & Nathan Sobo
1a398ffcb9 Use class instead of id for autocomplete 2012-04-20 14:29:00 -06:00
Corey Johnson & Nathan Sobo
df219f2ad5 Autocomplete.activate enables autocomplete for all current and future editors.
Also attach autocomplete view to editor instead of document.body
2012-04-20 11:23:08 -07:00
Corey Johnson
aac511deff 💄 2012-04-20 10:38:27 -07:00
Nathan Sobo
f965979fb8 Merge branch 'master' of github.com:github/atom 2012-04-20 11:03:42 -06:00
Nathan Sobo
7b984f3743 Don't throw exception when confirming autocomplete with no matches 2012-04-20 11:03:25 -06:00
Corey Johnson
82864d683a Removing text from Autocomplete's mini-editor refilters match list 2012-04-20 09:23:19 -07:00
Corey Johnson
01865e07fd Remove autocomplate:toggle, replace with autocomplete:attach and autocomplete:cancel 2012-04-20 08:41:56 -07:00
Corey Johnson
eaf7ee8ec1 Only emit editor-open event once (on first attachment) 2012-04-19 18:12:55 -07:00
Corey Johnson & Nathan Sobo
800f16bb29 Editor emits an editor-open event when attached 2012-04-19 17:56:08 -07:00
Corey Johnson & Nathan Sobo
b1ab0735c7 Add ability to simulate DOM attachment to spec helper 2012-04-19 17:56:08 -07:00
Nathan Sobo
0024cf89de Auto-complete matches can be fuzzy-filtered. Typing non-word characters confirms the match automatically.
Extract fuzzyFilter function into a file that is shared between file finder and autocompleter. Fix jQuery.fn.preempt to pass its arguments to the event handler.
2012-04-19 18:17:08 -06:00
Corey Johnson & Nathan Sobo
6ea9901ef2 Autocomplete uses miniEditor 2012-04-19 14:59:02 -07:00
Corey Johnson & Nathan Sobo
12a150b446 Move cursor to end of completed word on confirm 2012-04-19 12:32:44 -06:00
Corey Johnson & Nathan Sobo
905f91a179 💄 2012-04-19 12:09:45 -06:00
Corey Johnson & Nathan Sobo
66f7373b3d When insertion of text during autocomplete results in no matches, automatically select current match and insert the inserted text after it 2012-04-19 12:03:47 -06:00
Corey Johnson & Nathan Sobo
99621acdd7 Finish partially-commented autocomplete spec 2012-04-19 11:23:20 -06:00
Corey Johnson & Nathan Sobo
16837b67a9 Autocomplete menu is updated when user types additional characters 2012-04-19 11:20:18 -06:00
Corey Johnson & Nathan Sobo
7462222387 Allow calls to startBatch/endBatch to be nested 2012-04-19 11:19:24 -06:00
Corey Johnson & Nathan Sobo
881e3b86db 💄 2012-04-19 10:33:45 -06:00
Corey Johnson & Nathan Sobo
49b5263fd7 Listen on Editor for bubbled textInput events instead of directly on hidden input 2012-04-19 10:14:45 -06:00
Corey Johnson & Nathan Sobo
d768f1a50f Autocomplete closes when when cursor position changes 2012-04-18 17:22:52 -07:00
Corey Johnson & Nathan Sobo
5e1d7c774c Serialized Editor state no longer contains Buffer objects 2012-04-18 15:57:58 -07:00
Corey Johnson & Nathan Sobo
a8d9d1690e Autocomplete preempts Editor move-up and move-down events and unsubscribes from Buffer change events when Editor is removed. 2012-04-18 15:56:09 -07:00
Corey Johnson & Nathan Sobo
6037d83f2b $.fn.preempt takes namespaced event names 2012-04-18 15:53:42 -07:00
Corey Johnson & Nathan Sobo
6a260a8359 Add $.fn.preempt, which runs the given event handler before any others. 2012-04-18 12:13:05 -07:00
Corey Johnson
e58ba6376d Listen on Editor for autocomplete:cancel events 2012-04-18 11:38:55 -07:00
Corey Johnson
82191a80cb Listen for autocomplete:select on Editor 2012-04-18 11:34:46 -07:00
Corey Johnson
bee683245b move-up, move-down change selection in autocomplete 2012-04-18 10:23:15 -07:00
Nathan Sobo
34d41032d4 Merge branch 'master' of github.com:github/atom 2012-04-18 11:09:42 -06:00
Nathan Sobo
e89a2255cf Tear down editors and unsubscribe from buffers on window unload to prevent exceptions when typing after reload 2012-04-18 11:01:30 -06:00
Corey Johnson
904c05660d Add move-down event to Autocomplete 2012-04-17 17:37:19 -07:00
Corey Johnson
f8fd7251e4 Add 'move-down' event to autocomplete 2012-04-17 17:37:19 -07:00
Corey Johnson
d41ac6626f Autocomplete extends View 2012-04-17 17:37:19 -07:00
Corey Johnson
c96ac1638f 💄 2012-04-17 17:37:18 -07:00
Nathan Sobo
fe3420f614 Add StripTrailingWhitespace extension.
It's not on by default, and needs to be initialized from the init script.
2012-04-17 17:50:57 -06:00
Nathan Sobo
0a9e14a408 Buffers emit 'before-save' and 'after-save' events during save 2012-04-17 17:45:40 -06:00
Nathan Sobo
331984148f Project.proto.open emits a 'new-buffer' event if a new buffer is created
RootView.proto.open always uses Project's open method now. RootView creates a project with no path when editing a new buffer, so there's always a project.
2012-04-17 17:15:19 -06:00
Nathan Sobo
77ba75a4c6 Trying to position at the bottom. We need a better flexbox impl 2012-04-17 13:41:31 -06:00
Nathan Sobo
012237678e Status bar renders current path and buffer position on initialization 2012-04-17 12:09:06 -06:00
Nathan Sobo
a5a573d732 StatusBar.initialize appends a status bar view to every current and future editor pane 2012-04-17 11:37:01 -06:00
Corey Johnson
5b67feff54 Autocomplete will match on either side of selected text when completing words 2012-04-16 16:26:09 -07:00
Corey Johnson
e40040c573 Autocomplete creates selection over auto-completed text 2012-04-16 15:36:45 -07:00
Corey Johnson
eacb21ca1a Detach buffer change event listeners from Autocomplete when editor's buffer changes 2012-04-16 15:22:39 -07:00
Corey Johnson
c82ca5d1ee Store current buffer on Autocomplete 2012-04-16 15:15:43 -07:00
Corey Johnson
b61a14150e Very basic autocomplete working 2012-04-16 14:57:29 -07:00
Nathan Sobo
07acf0817e When opening a file, don't also create an edit session or an empty buffer
Also: RootView.proto.activeEditor no longer constructs an editor. To open an empty buffer, call RootView.proto.open with no path argument. It will build a new editor if needed.
2012-04-13 17:47:41 -06:00
Nathan Sobo
c899b5e827 Build a Project if necessary upon saving a previously unsaved buffer 2012-04-13 15:46:22 -06:00
Nathan Sobo
08b4a86f85 Set top and left position of root pane to 0 in adjustPaneDimensions 2012-04-13 15:27:15 -06:00
Nathan Sobo
7e3abe4ff3 Set document.title to the project path when the last editor is closed 2012-04-13 15:22:15 -06:00
Nathan Sobo
9819030b7d Set document.title to the project path even if there are no editors open + 💄 2012-04-13 15:14:18 -06:00
Nathan Sobo
6c5b2a47ec Reset document.title after each spec to prevent test pollution 2012-04-13 15:11:33 -06:00
Nathan Sobo
c673c5114e Ensure that Editor.proto.serialize returns a copy of each edit session 2012-04-13 14:29:58 -06:00
Corey Johnson & Nathan Sobo
57b205d508 When a Pane is removed, layout of #panes div is adjusted appropriately 2012-04-13 12:49:59 -06:00
Corey Johnson & Nathan Sobo
1b2b1a324d Add a mock-based test for Editor.prototype.split and ensure it doesn't raise exceptions when not in a pane 2012-04-13 11:40:29 -06:00
Corey Johnson & Nathan Sobo
54a15856bb Use Editor.deserialize in Editor.prototype.copy and add a spec for it 2012-04-13 11:39:57 -06:00
Nathan Sobo
d776755348 Focus the active editor when the file finder is closed 2012-04-12 15:56:41 -06:00
Nathan Sobo
8513e60903 Editor saves all edit sessions when window is refreshed 2012-04-12 15:46:44 -06:00
Corey Johnson & Nathan Sobo
3b7d7205f6 Move find-in-file event and specs to command panel 2012-04-12 14:55:47 -06:00
Corey Johnson & Nathan Sobo
877b4dc336 RootView constructor can be called with serialized view state data
Move the saving of serialized root view data to window.coffee. The window.startup method looks for window state on the atom object and instantiates the root view with that if it is present.
2012-04-12 14:47:51 -06:00
Corey Johnson & Nathan Sobo
416a15e3af Editors in #panes are always contained by .pane wrappers
This prepares us to refactor the split view and editor state code into Column, Row, and Pane objects.
2012-04-11 18:37:22 -06:00
Corey Johnson & Nathan Sobo
8a4b5b13bb Don't close the window when the last editor is closed. Focus the root view instead. 2012-04-11 17:42:02 -06:00
Nathan Sobo
ceaad1798b Remove @editors array from RootView 2012-04-11 17:18:06 -06:00
Nathan Sobo
75754fe62e Merge branch 'master' of github.com:github/atom 2012-04-11 14:59:03 -06:00
Nathan Sobo
535fba1af8 Previously focused editor is re-focused on refresh
The isFocused property has now been added to editor state. When an editor is attached to the dom, it focuses itself automatically if and only if the @isFocused property is true. The @isFocused property gets assigned when the editor is constructed by the root view with its previous state.
2012-04-11 14:58:51 -06:00
Corey Johnson
5097218aa2 meta-{ goes to previous buffer 2012-04-11 13:44:07 -07:00
Corey Johnson
bf367863ba meta-} goes to next buffer 2012-04-11 13:44:07 -07:00
Nathan Sobo
ad7b522228 💄 2012-04-11 14:05:52 -06:00
Nathan Sobo
3c53f20aad Split panes arrangements and editors are restored after refresh 2012-04-11 13:17:12 -06:00
Nathan Sobo
284f982e2c Call adjustSplitPanes after setting window state 2012-04-11 12:59:29 -06:00
Nathan Sobo
56e98aece5 Add window state getter and setter to RootView
These methods will be used to save and restore split views and editors on a refresh.
2012-04-10 19:30:44 -06:00
Nathan Sobo
f724b8f427 Uncomment assertions 2012-04-10 19:28:14 -06:00
Nathan Sobo
d5b93a2333 💄 2012-04-10 13:04:54 -06:00
Corey Johnson & Nathan Sobo
fa50e9705e No longer push empty batches onto undo stack 2012-04-10 10:25:29 -07:00
Corey Johnson
afceacefc8 meta-[ outdents selected lines 2012-04-10 10:18:39 -07:00
Corey Johnson
ec221bfee0 meta-] indents selected lines 2012-04-10 09:55:13 -07:00
Nathan Sobo
f9ee35dc87 Merge branch 'master' of github.com:github/atom
Conflicts:
	src/app/cursor.coffee
2012-04-09 14:47:55 -06:00
Nathan Sobo
cc52ff6f28 Bugfix: move-to-beginning-of-word no longer raises an error at position [0, 0] 2012-04-09 13:59:46 -06:00
Corey Johnson & Nathan Sobo
a21082395d 💄 2012-04-09 11:41:04 -07:00
Corey Johnson & Nathan Sobo
f3372f08de Ctrl-k cuts to the end of the line 2012-04-09 12:34:30 -06:00
Nathan Sobo
54396a7646 Fix bug where you can't move rightward over fold placeholders
Fold placeholders needed to be real token objects so their screen / buffer deltas would be defined in ScreenLineFragment.proto.translateColumn
2012-04-06 15:37:27 -06:00
Nathan Sobo
47685aab7b Correctly translate buffer positions to screen positions when the buffer has tab chars 2012-04-06 15:06:33 -06:00
Nathan Sobo
9da86982a8 WIP: Set cursor position correctly after inserting a hard tab.
Tests pass but still some issues on repeated tab insertion.
2012-04-06 13:03:30 -06:00
Nathan Sobo
1d7d59d673 💄 2012-04-06 12:21:24 -06:00
Nathan Sobo
656c8318f2 Shift-triple-click expands the selection over the clicked line 2012-04-06 11:07:19 -06:00
Nathan Sobo
76a846aacc Shift-double-click expands the selection over the clicked word
Also factored `get(Beginning|End)OfCurrentWordBufferPosition` methods out of `moveTo(Beginning|End)OfWord` on Cursor. They are used by a `getCurrentWordBufferRange` method, which Selection now uses to find the range of the current word.
2012-04-05 19:41:34 -06:00
Nathan Sobo
2fc3f78e26 Shift-click creates a selection
It would be nice to handle shift-double-click and shift-triple-click as well.
2012-04-05 18:12:48 -06:00
Nathan Sobo
fd3e98cd28 💄 2012-04-05 17:58:44 -06:00
Nathan Sobo
a3686da496 Move atom.tabText to a property on Editor.prototype for more locality 2012-04-05 17:55:15 -06:00
Nathan Sobo
aba968acd9 Tab key inserts spaces or a tab character depending on Editor.prototype.softTabs setting 2012-04-05 17:39:40 -06:00
Nathan Sobo
c4a23c7dd0 💄 2012-04-05 17:29:42 -06:00
Nathan Sobo
158315ffaa Always place cursor at end of selection after inserting text 2012-04-05 17:22:16 -06:00
Corey Johnson & Nathan Sobo
84ba78c55d Tab characters render as atomic tokens containing spaces 2012-04-05 15:22:57 -06:00
Corey Johnson & Nathan Sobo
4550f017c3 add fixture file with tabs 2012-04-05 13:13:32 -07:00
Nathan Sobo
77366b5497 Remove unused editor bounds methods 2012-04-05 09:38:50 -06:00
Nathan Sobo
845bc8fde4 Merge branch 'master' of github.com:github/atom 2012-04-04 18:27:40 -06:00
Nathan Sobo
1b848307d4 Restore selections on redo 2012-04-04 18:27:34 -06:00
Nathan Sobo
cbeb351de4 Restore selections after undo
This only restores changes made via the CompositeSelection… this makes sense because this is the only way to make changes interactively. Any other changes are made via the api or a command line and should not modify selections when they are undone. Still need to test restoration after redo.
2012-04-04 18:04:32 -06:00
Nathan Sobo
5def158584 UndoManager's batch methods take optional arrays of ranges for restoring the selection 2012-04-04 17:07:52 -06:00
Corey Johnson
2489e19bb7 CompositeCursor.addCursor takes an optional screenPosition argument 2012-04-04 14:08:30 -07:00
Corey Johnson & Nathan Sobo
48b4008cab Changes made with multiple cursors are undone/redone in parallel 2012-04-04 14:21:03 -06:00
Corey Johnson
2e9bef04a9 A buffer with no path sets document.title to 'untitled' 2012-04-04 11:10:20 -07:00
Nathan Sobo
8d05802290 Redesign commands around multiple selections
Every command returns an array of buffer ranges to select from its execute method. The composite command loops through each current selection with each command, then sets the new selection to the aggregated buffer ranges returned by all commands at that step.
2012-04-04 12:09:33 -06:00
Nathan Sobo
abff6cf387 Add spec for global substitution in multiple selections 2012-04-04 11:22:49 -06:00
Nathan Sobo
4abf41e173 Merge branch 'master' of github.com:github/atom 2012-04-04 11:09:55 -06:00
Nathan Sobo
92cc23a9bb Substitutions work with multiple selections
The `execute` method on commands now has a second range parameter. The composite command loops through all selected ranges and calls execute on each subcommand for each range. Still need to update the `.` address to work with the new scheme.
2012-04-04 11:09:30 -06:00
Corey Johnson
6dc4d9bb05 Don't let atom spec bind default keys again 2012-04-03 17:21:13 -07:00
Corey Johnson
37a9d88b48 Spec helper uses window's keymap 2012-04-03 17:20:48 -07:00
Corey Johnson
2465372bd4 Multi-cursor scrolling is based on the last created cursor 2012-04-03 16:34:21 -07:00
Corey Johnson
d016cc27d3 Move autoScrolling methods from cursor to editor
Scroll methods are now Editor.scrollTo(), Editor.scrollHorizontally() and Editor.scrollVertically()

Editor.scrollTo() can only be called once per runloop
2012-04-03 16:12:04 -07:00
Corey Johnson
bd20d34132 Only one visible cursor causes the editor to scroll 2012-04-03 15:46:28 -07:00
Corey Johnson
a372a2b411 Add Editor.bounds() and Editor.screenPositionInBounds() 2012-04-03 15:36:25 -07:00
Nathan Sobo
846846abe8 Keymap normalizes key patterns so modifier keys can be listed in a random order. 2012-04-03 15:51:53 -06:00
Nathan Sobo
68bd79f8c2 Max line length is preserved when a new buffer is assigned to an editor. 2012-04-03 15:33:27 -06:00
Nathan Sobo
fb915f9c1c 💄 2012-04-03 15:24:11 -06:00
Nathan Sobo
3a8c444e1f Merge branch 'master' of github.com:github/atom 2012-04-03 15:01:34 -06:00
Nathan Sobo
d521dab2cf Horizontal scrollbar is always visible, and clicking scrollbars doesn't move cursor.
The editor is divided into gutter and scroller. The gutter is scrolled to the correct vertical position whenever the lines are scrolled inside of scroller.
2012-04-03 15:01:28 -06:00
Corey Johnson
1efb712fd3 Rename App.coffee to Atom.coffee. This also required moving src/atom,spec/atom to src/app,spec/app 2012-04-03 10:33:24 -07:00
Nathan Sobo
c5004b71b1 Selections are only cleared when cursor is explicitly moved
This allows multiple selections to be modified without changes to an earlier selection clearing later selections. It means we can remove the `modifySelections` method from `CompositeSelection` and just call methods on selections in a loop.
2012-04-03 11:27:49 -06:00
Corey Johnson
b4cfd7fc85 Selection and Cursor use Anchor to hold their buffer and screen positions 2012-04-03 08:58:25 -07:00
Corey Johnson
edbd378879 All keybindings are stored in the src/keybindings folder now 2012-04-02 08:57:08 -07:00
Corey Johnson
23fae4c919 Rename mentions of url to path 2012-03-30 15:52:19 -07:00
Corey Johnson
230f40bf3e Window title is set to active editor's buffer path. 2012-03-30 15:15:20 -07:00
Corey Johnson
abb585fbf6 Editor emits buffer-changed-event 2012-03-30 15:14:59 -07:00
Corey Johnson
001d866bec Event names are present tense, so buffer emits 'path-change' 2012-03-30 11:26:34 -07:00
Corey Johnson
90242a787f Use Buffer.getPath and Buffer.setPath(path) 2012-03-30 11:20:17 -07:00
Corey Johnson
551f09dce6 Buffer emits a 'path-changed' event when its path changes 2012-03-30 11:13:58 -07:00
Corey Johnson
5b7a02534c Made test run against empty project 2012-03-30 10:22:54 -07:00
Corey Johnson
dc7edc22cf Loading root view with no url opens an empty buffer 2012-03-30 09:42:02 -07:00
Nathan Sobo
b9cec3cd94 Editor handles delete-to-end-of-word, plus alt-d and alt-delete bindings for it 2012-03-29 15:32:37 -07:00
Nathan Sobo
fc76bed81e x/$/ places cursors at end of lines in current selection
Editor addSelectionForBufferRange no longer attempts to recycle an existing empty selection, because this was interfering with x selecting zero-width matches. It always adds a new selection, and tools must take care to use it correctly.
2012-03-29 11:46:56 -07:00
Nathan Sobo
722b685b2e Editor handles backspace-to-beginning-of-word 2012-03-29 11:33:15 -07:00
Nathan Sobo
e56ced8f3b Merge branch 'master' of github.com:github/atom 2012-03-29 11:12:23 -07:00
Corey Johnson
d739ebddbc Add tests to traverseRegexMatchesInRange 2012-03-29 11:01:26 -07:00
Corey Johnson & Nathan Sobo
90ebbe80e6 Add select-to-end-of-word and select-to-beginning-of-word 2012-03-29 09:53:18 -07:00
Nathan Sobo
b053f42880 Merge branch 'master' of github.com:github/atom 2012-03-28 18:08:14 -07:00
Nathan Sobo
a27b54b21b Up/down in command panel navigates command history. 2012-03-28 18:08:00 -07:00
Corey Johnson & Nathan Sobo
88c4705f8a Add move-to-end-of-word and move-to-beginning-of-word.
Buffer.traverseRegexMatchesInRange matches text that at end of range, even if the match could have exceeded end of the range.
2012-03-28 17:39:03 -07:00
Nathan Sobo
a4c25dc678 Flash red when entering a malformed command in the command panel 2012-03-28 16:11:44 -07:00
Nathan Sobo
e0ed462c6e Merge branch 'master' of github.com:github/atom 2012-03-28 15:42:29 -07:00
Nathan Sobo
7ea3b2d75d Regex searches wrap around to the beginning of the buffer 2012-03-28 15:42:09 -07:00
Corey Johnson & Nathan Sobo
2d85825126 Add select-to-beginning-of-line and select-to-end-of-line 2012-03-28 15:12:46 -07:00
Nathan Sobo
a90380bc63 Editor handles move-to-first-character-of-line
Moves to the first character of the line, unless its already on the first character, in which case it moves to the first column of the line.
2012-03-28 15:09:10 -07:00
Nathan Sobo
664e8c1701 Editor handles move-to-previous-word events 2012-03-28 14:36:40 -07:00
Nathan Sobo
bd0e4fa467 💄 2012-03-28 14:22:53 -07:00
Nathan Sobo
8ca55d7dfd Merge branch 'master' of github.com:github/atom 2012-03-28 14:20:54 -07:00
Nathan Sobo
e7a9ee5bee Add Buffer.backwardsTraverseRegexMatchesInRange 2012-03-28 14:20:41 -07:00
Corey Johnson & Nathan Sobo
2352b49bb6 Add move-to-beginning-of-line and move-to-end-of-line events to editor 2012-03-28 14:15:51 -07:00
Corey Johnson & Nathan Sobo
c6d7aaf39c Add basic top/bottom cursor/selection commands 2012-03-28 13:59:43 -07:00
Nathan Sobo
cce1218fda Editor supports move-to-next-word events 2012-03-28 13:50:52 -07:00
Nathan Sobo
378e867377 Add a disabled failing test for substitution with multiple selections 2012-03-28 10:18:55 -07:00
Nathan Sobo
5146abb7e1 Eliminate Editor.getCursor 2012-03-28 10:17:46 -07:00
Nathan Sobo
8727caf97a Regex addresses always search from the last selection in the buffer 2012-03-27 18:30:49 -07:00
Nathan Sobo
847e3d16e5 Add Buffer.traverseRegexMatchesInRange 2012-03-27 17:41:53 -07:00
Nathan Sobo
7707ac5943 Substitution matches ^ to the beginning of lines 2012-03-27 17:02:17 -07:00
Corey Johnson & Nathan Sobo
5e89c44477 Match $ in command regexes as end of line. Don't infinitely loop on substituting zero-width matches 2012-03-27 15:39:07 -07:00
Corey Johnson & Nathan Sobo
7d969e145a x command loops over all selected regions 2012-03-27 14:32:20 -07:00
Nathan Sobo
ad3aa0709c Add x command, which selects all matches in the current selection 2012-03-27 12:54:28 -07:00
Nathan Sobo
461fdd5e61 Selection merging with mouse maintains directionality of last selection 2012-03-27 11:52:55 -07:00
Corey Johnson & Nathan Sobo
e62e062f9b Maintain selection directionality when merging selections with keyboard 2012-03-27 11:26:36 -07:00