Commit Graph

6920 Commits

Author SHA1 Message Date
Cheng Zhao
a630f05ae4 The dragged tab should carry information of file. 2013-04-09 15:37:30 +08:00
Kevin Sawicki
9173711b58 Look for markdown preview in all panes to update
Previously only the next pane was checked to see if a preview
exists to update.  This would fail to update the preview if
it was moved moved from its original pane to a different pane.

Now the view tracks the buffer and updates on 'saved' events and
shows the preview if it is not in the active pane.
2013-04-08 18:26:55 -07:00
Kevin Sawicki
09b7fe72eb Detach instead of remove when moved item is the view
Moving an item that extended the jQuery object between panes
was previously wiping out all jQuery data since remove() was being
called on the view item instead of detach().
2013-04-08 18:22:58 -07:00
Kevin Sawicki
758ff58d2d 💄 2013-04-08 17:04:53 -07:00
Kevin Sawicki
d1c9d0ea68 Focus pane after reopening it
Previously the reopened item would not have focus if it was
reopened into a newly appended pane.
2013-04-08 16:54:05 -07:00
Nathan Sobo
ae77011385 Unsubscribe correctly in subscribeToCommand 2013-04-08 17:46:29 -06:00
Kevin Sawicki
2f67312a80 Don't prompt to save if buffer is opened elsewhere
This corrects a regression where closing an edit session that
is opened somewhere else should not prompt to save since it
won't be lost if closed immediately since it is still open in
another pane.
2013-04-08 16:30:35 -07:00
Nathan Sobo
78cb747a39 No need to .off events explicitly now 2013-04-08 17:25:13 -06:00
Nathan Sobo
2601f266fa Add subscribeToCommand to track command subscriptions on other views 2013-04-08 17:09:12 -06:00
Kevin Sawicki
7c9119c793 Add ImageEditSession.canOpen(path)
This returns whether the path specified is an image that can
be loaded internally by the image view.
2013-04-08 15:46:24 -07:00
Kevin Sawicki
9949f044cc Call super from ImageView.initialize()
This allows the ScrollView superclass to set up bindings
for scrolling events.
2013-04-08 15:36:43 -07:00
Kevin Sawicki
d42db869cd Keep image centered after window resizes 2013-04-08 15:36:43 -07:00
Kevin Sawicki
7a709b05f3 Support zooming images in/out and resetting 2013-04-08 15:36:43 -07:00
Kevin Sawicki
6ce3f87448 Add initial image viewer
An image session will be opened by project.buildEditSession()
for known image extensions.

Closes #203
2013-04-08 15:36:35 -07:00
Kevin Sawicki
cd7a906b9a Use Pane.activeView instead of Pane.viewForActiveItem()
viewForActiveItem() can create a view which we don't want to do
when responding to events in the status bar. Instead we just want
to access the already existing view for the active item.
2013-04-08 13:58:22 -07:00
Kevin Sawicki
5e504d6c08 Support more than just editors in the status bar
The status bar view now tracks the active pane item
and hides and shows elements that apply for the active
item such as path, cursor position, grammar, etc.
2013-04-08 13:26:57 -07:00
Kevin Sawicki
e3b381f638 Add RootView.eachPane(callback) 2013-04-08 13:04:50 -07:00
Kevin Sawicki
c7175c7e5f Return top and left values of 0 when not visible 2013-04-08 13:03:19 -07:00
Kevin Sawicki
8993258e74 Update display when cancelled
This will force the rendered line to be cleared
so it doesn't flicker the next time the list is opened.
2013-04-08 12:54:56 -07:00
Kevin Sawicki
b7b4dcda24 Schedule redraw when updating an invisible editor
The redrawOnReattach flag will now be set when update
display is called on an invisible editor so that if the
editor is detached or hidden before the next update was
processed it will be performed when reattached.
2013-04-08 12:50:05 -07:00
Kevin Sawicki
63017b7800 Attach editor and update display in spec
This is required now that the editor checks visibility
before updating the display.
2013-04-08 12:10:57 -07:00
Kevin Sawicki
503b1231db Redraw editor when it becomes the active view
Start watching for when the editor becomes the active view
once it is attached and redraw it when it does.
2013-04-08 12:00:25 -07:00
Cheng Zhao
314324562e Update node-pathwatcher to v0.1.5. 2013-04-08 12:00:52 +08:00
Cheng Zhao
f4161a1889 Restart interval of main window should be longer than specs window. 2013-04-08 12:00:52 +08:00
Cheng Zhao
17e9c6ea3b Restart renderer process when reloaded for 4 times.
Fix #481.
2013-04-08 12:00:52 +08:00
Kevin Sawicki
dc94855e1a Parse emoji start, word, and end into different scopes 2013-04-07 15:07:57 -07:00
Kevin Sawicki
4636e9ca40 Unsubscribe if editor has no session 2013-04-07 14:52:20 -07:00
Cheng Zhao
049a2b3884 Merge pull request #485 from github/node-pathwatcher
Use node-pathwatcher to replace $native.watchPath.
2013-04-07 05:50:43 -07:00
Cheng Zhao
7c8e1634b8 Remove native path watcher code. 2013-04-07 19:33:27 +08:00
Cheng Zhao
e0865e8c38 Use node-pathwatcher. 2013-04-07 16:35:35 +08:00
Cheng Zhao
20580a5da8 Merge pull request #478 from github/no-drag-drop
Don't respond to drag-drop of external files
2013-04-05 23:39:42 -07:00
Kevin Sawicki
fcb90abfda Don't show status colors on selected arrow 2013-04-05 15:05:43 -07:00
Kevin Sawicki
b9fcfda904 Only match brackets if underlayer is visible 2013-04-05 15:05:43 -07:00
Nathan Sobo
763729d08d 🏇 Use buffer ranges to see if selections intersect 2013-04-05 14:52:36 -06:00
Nathan Sobo
6042439598 Add emacs bindings for add selection commands: alt-ctrl-n/p 2013-04-05 14:52:36 -06:00
Nathan Sobo
987f80aeb3 Bind add selection commands to alt-shift-up/down 2013-04-05 14:52:35 -06:00
Nathan Sobo
abc5ed5190 Add editor:add-selection-above command 2013-04-05 14:52:35 -06:00
Nathan Sobo
3e07351552 Also bind escape to consolidate selections in mini editors 2013-04-05 14:52:35 -06:00
Nathan Sobo
a7091c8d94 Remove *all* !important expressions once specificity is calculated 2013-04-05 14:52:35 -06:00
Nathan Sobo
37e16bb163 Clear multiple selections on escape
The binding uses the `!important` selector to ensure that the editor
always gets a chance to clear multiple selections before other bindings
for escape are processed.
2013-04-05 14:52:35 -06:00
Nathan Sobo
7018f33ad7 Allow !important flag in keymap selectors 2013-04-05 14:52:35 -06:00
Nathan Sobo
2efed9f42c Add EditSession.consolidateSelections() 2013-04-05 14:52:30 -06:00
Nathan Sobo
bd58834e7d Merge goal ranges when merging selections 2013-04-05 14:17:21 -06:00
Nathan Sobo
be009e87c2 Skip empty lines when adding selections below empty selections
Unless the selection's column is 0
2013-04-05 14:17:21 -06:00
Nathan Sobo
393cba4d42 Don't skip shorter lines when the adding empty selection below 2013-04-05 14:17:21 -06:00
Nathan Sobo
131df22c11 Skip lines that are too-short when adding non-empty selection below 2013-04-05 14:17:21 -06:00
Nathan Sobo
40d7fcf32c 🙊 2013-04-05 14:17:21 -06:00
Nathan Sobo
ff8491f8d3 Base cursor visibility on marker emptiness instead of tail status 2013-04-05 14:17:20 -06:00
Nathan Sobo
f22461e5e8 Clear goal range when selection is modified
Just like the cursor clears its goal column when it is moved in any
way other than vertically, the selection clears its goal range (the
range it will attempt to use when adding a selection below) when it
is changed in any way.
2013-04-05 14:17:20 -06:00
Nathan Sobo
7b7c77645c Rename SelectionView.destroyed to .needsRemoval to match CursorView 2013-04-05 14:17:20 -06:00