Commit Graph

39 Commits

Author SHA1 Message Date
Kevin Sawicki
e40dc5c4a6 💄 2014-11-17 08:54:41 -08:00
Kevin Sawicki
cfd918977b Only paste on middle mouse button 2014-11-17 08:43:16 -08:00
Kevin Sawicki
e7efaeaf17 Listen for middle mouse paste on linux 2014-11-17 08:39:56 -08:00
Nathan Sobo
ed6ca9cd06 Remove .editor class to force themes to style background via :host
The goal is to allow the editor’s styling to be overridden as follows:

atom-text-editor {
  background: black;
  color: white;
}

If we retain these classes, themes will continue to style the root
element of the editor and destroy the ability to style the editor in
this way. You would instead have to do the following:

atom-text-editor::shadow .editor {
  background: black;
  color: white;
}

This is way less intuitive and confusing for people.
2014-11-13 16:04:57 -08:00
Nathan Sobo
08971562cd Store useShadowDOM setting when TextEditorElement is created
Rather than reading it repeatedly, since the value could potentially
change over time.
2014-11-13 16:04:56 -08:00
Ben Ogle
b369a1085c Use headPixelPosition in overlay decoration rendering 2014-11-12 14:43:52 -08:00
Ben Ogle
9399e00033 Properly display when a marker is reversed 2014-11-11 13:32:13 -08:00
Ben Ogle
c79db992d9 Overlay decorations render 2014-11-11 11:25:36 -08:00
Max Brunsfeld
3c800b00f5 Always re-render scrollbars after themes load/reload
Signed-off-by: Nathan Sobo <nathan@github.com>
2014-11-10 17:59:41 -08:00
Max Brunsfeld
d97c81bf6a Make undo grouping interval configurable 2014-11-06 09:25:10 -08:00
Max Brunsfeld
4077e791c9 Update signature of calls to TextBuffer::transact 2014-11-05 15:58:13 -08:00
Max Brunsfeld
e7eef89fa5 Remove TextEditor::withGroupingInterval
Just use ::transact
2014-11-05 15:58:13 -08:00
Max Brunsfeld
5437236304 Use undo grouping in editor command listeners 2014-11-05 15:58:13 -08:00
Nathan Sobo
100af7d27d Fix corner cases related to lifecycle state of EditorComponent on events
Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2014-11-04 16:37:28 -07:00
Nathan Sobo
9690e44ffe Correctly handle focus when shadow DOM is disabled
Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2014-11-04 16:37:27 -07:00
Nathan Sobo
eb19989ecd Handle focus at the host element level
Detecting focus and blur at the level of the input is creating problems
when we blur and then immediately refocus. This is simpler.
2014-11-04 16:37:25 -07:00
Nathan Sobo
1f777addd9 Sample font styling when font config values change
We previously could do it whenever stylesheets changed, but these values
end up getting assigned to the global stylesheet for cascading reasons
and we’re only watching the local stylesheet. We poll the host elements
DOM properties, but forcing a sync poll when the config values change
makes behavior synchronous for specs and more responsive when changing
these values.
2014-11-04 16:37:24 -07:00
Nathan Sobo
42fc54f716 Protect against stylesheets changing while detached 2014-11-04 16:37:23 -07:00
Nathan Sobo
b2bc09c13d Apply stylesheets with atom-editor-context in text editor specs 2014-11-04 16:37:22 -07:00
Nathan Sobo
5be21d6743 Avoid traversing through shadow root on mousewheel events 2014-11-04 16:37:22 -07:00
Nathan Sobo
2ab5fa405c Apply mini and is-focused class to both editor host element and root
This preserves existing theming behavior
2014-11-04 16:37:22 -07:00
Nathan Sobo
2affff30ff Handle events with native handlers to avoid shadow DOM issues with React 2014-11-04 16:37:21 -07:00
Nathan Sobo
3c7eecbb6a Dispose of scoped config subscriptions when TextEditorComponent unmounts
Fixes #3998
2014-10-29 15:04:39 -06:00
Nathan Sobo
2965398062 Throw on non-release builds if translating positions on destroyed editor
It’s possible that bundled packages stray into this corner case, so I’d
like us to catch and fix misbehaving packages before exposing users to 
any exceptions. Once we go one release with this turned on, we can
enable the exception for all builds.
2014-10-27 07:38:18 -06:00
Kevin Sawicki
92d08b47ad Add config for font zooming when Ctrl+Scrolling 2014-10-15 16:59:43 -07:00
Kevin Sawicki
5c3a7a99fc Merge pull request #3737 from russlescai/rl-mousewheel-ctrl-zoom-with-fixes
Adjust font size using Control key with Mouse Scroll Wheel.
2014-10-15 16:52:46 -07:00
Ben Ogle
f2d480fc72 getGrammarScopeDescriptor -> getRootScopeDescriptor 2014-10-08 16:01:42 -07:00
Ben Ogle
f662b3d745 💄 Normalize the names of related subscription things 2014-10-08 16:01:41 -07:00
Ben Ogle
2605044f19 Scope editor.showIndentGuide 2014-10-08 16:01:41 -07:00
Nathan Sobo
1e4f4e0882 Move editor commands to global command registry 2014-10-08 12:13:13 -07:00
Nathan Sobo
003b67ee19 Add TextEditorElement and make TextEditorView a wrapper around it
This is the next step on converting all internal views to custom
elements instead of using SpacePen. The TextEditorElement instances
are associated with ::__spacePenView fields that are used for supporting
legacy access paths via atom.workspaceView.
2014-10-08 12:13:13 -07:00
Russell Lescai
38a6f52ef7 Rearranged onMouseWheel function for tidier merge. 2014-10-07 11:16:25 +10:30
Russell Lescai
33e2829697 Adjust font size using Control key with Mouse Scroll Wheel. 2014-10-07 10:18:12 +10:30
Nathan Sobo
e44f4fbc84 Fix renaming error throwing exception in checkout-head-revision command 2014-10-01 17:04:34 -06:00
Nathan Sobo
33c1ce863e Pluralize Project API
This changes all APIs concerning paths and repositories on the project
to be plural, preparing us to switch to multi-folder projects. It
doesn’t make any changes to actually support multiple folders. Instead
we just wrap the previous return values in singleton arrays.

* constructor ‘path’ params -> ‘paths’
* getRootDirectory -> getDirectories
* getPath -> getPaths
* setPath -> setPaths
* getRepo -> getRepositories
2014-10-01 10:48:39 -06:00
Ben Ogle
50cf5f3e95 Subscribe to editor commands
We need to unsubscribe when the editor is removed!

Closes #3651
2014-09-30 09:33:50 -07:00
Ben Ogle
3a8f842de3 Remove uses of toggle 2014-09-29 16:09:47 -07:00
Ben Ogle
683d0d1b16 Editor -> TextEditor 2014-09-25 15:14:29 -07:00
Ben Ogle
b3038eb968 editor-component -> text-editor-component 2014-09-25 15:14:29 -07:00