Commit Graph

6022 Commits

Author SHA1 Message Date
Nathan Sobo
0192c57f46 Fix corner case in RowMap::mapBufferRowRange w/ 0-buffer-row regions
Fixes #688

The DisplayBuffer applies buffer and screen deltas to the row map as
rows are inserted/removed from the buffer/screen. This can leave some
of the regions in a weird state, such as mapping multiple screen rows
to zero buffer rows. But next the DisplayBuffer applies any new mappings
based on the replaced lines over the top of existing regions. These
weirdly shaped regions should be overwritten by newly inserted regions,
so at the end of the operation the row map makes sense again.

This fixes a corner case where regions spanning 0 buffer rows at the
very beginning of the row range were not being included in the set of
regions to replace. This was in turn causing the RowMap to get into a
bad state in certain situations involving soft-wrapped lines.
2013-08-20 19:30:29 -06:00
Nathan Sobo
b60b21cf3a Add RowMap::inspect, which returns a string for debugging the regions 2013-08-20 19:30:28 -06:00
Kevin Sawicki & Nathan Sobo
116c56c236 Serialize site across window loads
This prevents issues with the site counter resetting to 1 on each
load causing duplicate array and marker ids to be generated.

Closes #729
2013-08-20 18:29:19 -07:00
Kevin Sawicki
6e2fd18f62 Add back ability to open an arbitrary window
atom.open now takes an options has that can contain either pathsToOpen
or the complete settings of a new window.

This will be used by the collaboration package to open the window when a
session is being joined.
2013-08-20 15:30:53 -07:00
Kevin Sawicki
2fee0f1083 💄 space separate array items 2013-08-20 14:20:16 -07:00
Corey Johnson & Nathan Sobo
85626383ee Move command handling to AtomWindow 2013-08-20 12:23:15 -07:00
Corey Johnson & Nathan Sobo
fc60ba682c 💄 2013-08-20 12:23:15 -07:00
Corey Johnson & Nathan Sobo
0e7cb3ff78 🔫 2013-08-20 12:23:15 -07:00
Corey Johnson & Nathan Sobo
03ef5a72c4 Make getTemplate take keystrokesByCommand as a parameter
This clarifies the fact that we can't call this method without having
a keystrokes hash from a running window, which is why we also have a
getDefaultTemplate method which doesn't need the keystrokes.
2013-08-20 12:23:15 -07:00
Corey Johnson & Nathan Sobo
2cd91eda98 💄 2013-08-20 12:23:15 -07:00
Corey Johnson & Nathan Sobo
5d27d56056 Rename ApplicationMenu::parseTemplate to translateTemplate 2013-08-20 12:23:15 -07:00
Corey Johnson & Nathan Sobo
0c9a1fdc80 Rename Keymap::toObject to Keymap::keystrokesByCommand
Also add spec for passing a selector
2013-08-20 12:23:15 -07:00
Corey Johnson & Nathan Sobo
79dd4320da Rename AtomMenu to ApplicationMenu 2013-08-20 12:23:14 -07:00
probablycorey
37c7c8abee Remove the whitespace grunt:lint was complaining about 2013-08-20 12:23:14 -07:00
probablycorey
77bb829a3e Make keymap.toObject(selector) work 2013-08-20 12:23:14 -07:00
probablycorey
dba0998687 Revert "trigger commands from the browser process on the active.element"
This reverts commit f023ce89096b1c7a6faf337cf48d29cfbb296091.
2013-08-20 12:23:14 -07:00
probablycorey
0c542d2317 Menu Items only show keyBindings that match the selector "body" 2013-08-20 12:23:14 -07:00
probablycorey
477ac1768b Rename ApplicationMenu to AtomMenu
This is so all browser process classes start with Atom.*
2013-08-20 12:23:14 -07:00
probablycorey
39ec96021e Listen for application commands using the @command method
This adds application level commands to the command palette.
2013-08-20 12:23:14 -07:00
probablycorey
ab397b306c AtomApplication listens for application level events 2013-08-20 12:23:14 -07:00
probablycorey
d3575bd45e Remove return value from openPath()
It is not used anywhere
2013-08-20 12:23:13 -07:00
probablycorey
f6ad85488c Fix parameter ordering 2013-08-20 12:23:13 -07:00
probablycorey
b8406368c6 Add underscore so download update menu item works 2013-08-20 12:23:13 -07:00
probablycorey
6278364ed2 💄 2013-08-20 12:23:13 -07:00
probablycorey
068e656627 Remove unused atom.getVersion method 2013-08-20 12:23:13 -07:00
probablycorey
6d50d05336 Move default menu creation into ApplicationMenu 2013-08-20 12:23:13 -07:00
probablycorey
60d804fb72 Don't intercept non-core commands 2013-08-20 12:23:13 -07:00
probablycorey
fb2439f193 Move ApplicationMenu to the AtomApplication
This moves it completely out of the renderer process
2013-08-20 12:23:13 -07:00
probablycorey
4d8b2672ff Rename menu-bar to application-menu
Also move it to the src root in preparation for it's use in the
browser process
2013-08-20 12:23:13 -07:00
probablycorey
e057d35048 Create a MenuBar object (instead of treating it like a singleton.) 2013-08-20 12:23:13 -07:00
probablycorey
6e3517dd4a Menu bar does not directly access the keymap anymore
This makes the keyBindingsForCommand methods obsolete
2013-08-20 12:23:12 -07:00
probablycorey
37c17075ea Add keymap.toObject() 2013-08-20 12:23:12 -07:00
probablycorey
1074642e8f Remove unused openWindow method 2013-08-20 12:23:12 -07:00
probablycorey
e360379ced Create default menu bar that is shown if atom crashes during launch 2013-08-20 12:23:12 -07:00
probablycorey
efb70e0562 Remove specs and methods that are no longer used 2013-08-20 12:23:12 -07:00
probablycorey
9a156c8629 Remove keymap.bindDefaultKeys
No longer needed since default keys are handled in AtomApplication
2013-08-20 12:23:12 -07:00
probablycorey
afd1a7419d Menu bar is load by the first created Atom Window 2013-08-20 12:23:12 -07:00
Corey Johnson
b3582b2632 Add keymap.keyBindingsForCommand 2013-08-20 12:23:11 -07:00
Corey Johnson
e68bc47dc5 💄 2013-08-20 12:23:11 -07:00
Corey Johnson
b5f4b8d254 Set devMode option on loadSettings 2013-08-20 12:23:11 -07:00
probablycorey
8803bab816 trigger commands from the browser process on the active.element 2013-08-20 12:23:11 -07:00
Kevin Sawicki
27cee3e19c Don't terminate tokenization if stack size changes
Previously Python import blocks were not tokenizing correctly since
the loop was prematurely terminating when a match at the end of the line
was reached and no tokens were generated for it.

This approach was incorrect since the tokenizer may have just popped a rule
and another loop could possibly pop more rules.

Now this early termination is only performed if the stack size hasn't changed.
2013-08-20 11:38:06 -07:00
Kevin Sawicki
d89e95dc54 💄 Move extend under class declaration 2013-08-20 10:15:31 -07:00
Kevin Sawicki
87b859b947 Update links for new repo location under atom org. 2013-08-19 20:50:09 -07:00
Kevin Sawicki
76332c76bd Flatten src directory
* Move src/app to src/
  * Move src/stdlib to src/
  * Remove src/app and src/stdlib from NODE_PATH
2013-08-19 20:13:57 -07:00
Kevin Sawicki
45c11e6fd4 Move src/app/keymaps to repo root 2013-08-19 20:13:57 -07:00
Kevin Sawicki
b6785d78e8 Reset themes in afterEach
This ensures they don't bleed over into other specs.
2013-08-19 19:49:52 -07:00
Kevin Sawicki & Nathan Sobo
f76108fdfd 🐎 Cache tab whitespace regexes in Token 2013-08-19 18:07:32 -07:00
Ben Ogle
8ea8671430 Merge pull request #706 from github/bo-inject-less-vars
Add theme dir(s) to less import paths -> allow package LESS to import from the current theme
2013-08-19 18:03:55 -07:00
Kevin Sawicki & Nathan Sobo
0af8c9362b Remove duplicate call to TokenizedBuffer:resetTokenizesLines()
This is already handled in an event listener bound to 'grammar-changed'
which TokenizedBuffer::setGrammar triggers.
2013-08-19 16:20:35 -07:00