Commit Graph

78 Commits

Author SHA1 Message Date
Maxime Coste
905af05c61 Move Context scope access helpers as inline methods 2015-07-13 13:43:52 +01:00
Maxime Coste
ddd70fd09a Make empty context construction more explicit 2015-04-19 18:47:52 +01:00
Maxime Coste
1dfa2d7fe4 Avoid unneeded update of selections when we are going to overwrite them 2015-04-19 15:12:16 +01:00
Maxime Coste
9f65a4e6dd Remove Context::set_selections, use Context::selections() = ... 2015-04-19 15:00:37 +01:00
Maxime Coste
8df77121d7 Rename safe_ptr and ref_ptr to SafePtr and RefPtr 2015-02-19 13:58:25 +00:00
Maxime Coste
da562e03a0 replace all std::vector with Vector 2015-01-12 13:58:41 +00:00
Maxime Coste
1c8ee78d1a Do not register timers for transient input handlers 2014-12-18 23:12:58 +00:00
Maxime Coste
d57be83522 Disable history writing when running hooks 2014-12-05 14:01:07 +00:00
Maxime Coste
1c5975835e Consolidate constext disablable feature in a 'Disableable' helper 2014-12-05 13:47:09 +00:00
Maxime Coste
e8c8833211 Do not reset edition level to 0 on buffer change
Keep it as is, commit undo in current buffer, and we will commit it in
the new buffer when edition level gets back to 0.
2014-11-21 18:56:39 +00:00
Maxime Coste
e38ba6ce3d Add scope class and encapsulate Options, Keymaps, Aliases and Hooks in it 2014-10-30 14:04:57 +00:00
Maxime Coste
185b980718 Add scoped aliases
aliases are now stored in window, buffer, or globally.
2014-10-30 14:02:13 +00:00
Maxime Coste
729e55573f Support changing buffer when an edition is in progress 2014-10-10 14:00:24 +01:00
Maxime Coste
8ed16bb2e9 In non interactive interactive mode, disable user key mappings
exec and eval now accepts a -with-maps to use them. But by default
they are disabled, so that all the indent scripts work even if you
remap basic keys.

Fixes #217
2014-07-27 20:18:09 +01:00
Maxime Coste
731277a425 Disable hooks on a per context basis, and propagate that to Insert mode
using \ before entering insert mode will disable hooks during the whole
insert session rather than only the entering phase. That gives a nice
way of pasting text into kakoune.
2014-07-24 19:18:39 +01:00
Maxime Coste
df3bf7445d Replace boost::optional with our own implementation 2014-06-27 21:10:09 +01:00
Maxime Coste
7235180614 Use main selection index as default when accessing only one register value
Fixes #117
2014-06-21 11:31:08 +01:00
Maxime Coste
a5e028e1b1 Add Context::set_selections(std::vector<Selection>)
This methods avoids updating the context selection needlessly as
they are going to get replaced anyway.
2014-06-01 16:01:38 +01:00
Maxime Coste
bf98b38afd Use a plain SelectionList for Context, remove DynamicSelectionList 2014-05-14 19:49:04 +01:00
Maxime Coste
a06094b00e Use simple SelectionList for the Context::JumpList 2014-05-13 20:09:37 +01:00
Maxime Coste
ea3e92aa5e SelectionList know its buffer and timestamp 2014-05-13 20:09:06 +01:00
Maxime Coste
be417d3616 Remove dangling forward declaration of Editor class 2014-03-20 08:11:35 +00:00
Maxime Coste
86fd00d1ea Fix comment 2014-03-20 08:10:31 +00:00
Maxime Coste
9455303a1e Do not allow changing buffer when the context is editing 2014-01-06 20:07:08 +00:00
Maxime Coste
c0973075fa Get rid of Editor for good
ClientManager now stores only the free windows, clients take
ownership of its own.
2013-12-20 20:14:57 +00:00
Maxime Coste
d1ac813f61 Pass a Context rather than a Window to highlighters 2013-12-16 23:24:08 +00:00
Maxime Coste
ea95632709 Move Editor::selections_content to Context 2013-12-15 20:37:07 +00:00
Maxime Coste
7267b8281f Move insert and erase to normal.cc, and move edition management to context 2013-12-15 20:23:02 +00:00
Maxime Coste
935bc3cec9 Add Context::selections method, and use it in priority to the Editor's one 2013-12-15 14:25:23 +00:00
Maxime Coste
f8cadc0c57 move Client::m_name to context, no more need for DraftUI 2013-11-14 20:51:25 +00:00
Maxime Coste
ad275d1d1c Extract InputHandler from Client 2013-11-14 18:09:15 +00:00
Maxime Coste
6b77860fc0 Make Context a class, not a struct 2013-11-11 19:10:49 +00:00
Maxime Coste
2c09da50be Add key mapping support 2013-10-25 00:30:46 +01:00
Maxime Coste
fe0a4f0d11 Reset normal mode when changing the current editor 2013-10-15 18:50:43 +01:00
Maxime Coste
74fe8b5e8d Remove Context::numeric_param, pass it directly to normal mode functions 2013-10-10 21:22:20 +01:00
Maxime Coste
06e06d6ea6 remove print_status from UserInterface, pass status line to draw
Client store the current status line. This way calls to print status
do not force the user interface to display directly.
2013-09-16 19:15:13 +01:00
Maxime Coste
823812fd1a rename InputHandler to Client 2013-09-12 23:47:23 +02:00
Maxime Coste
ac7e437730 Move Client responsibilities to InputHandler
InputHandler owns it's UserInterface, and is directly stored by the ClientManager.
2013-09-12 23:39:34 +02:00
Maxime Coste
6cb8d69d29 Context: return DynamicSelectionLists in jump_{forward,backward} 2013-05-29 18:56:14 +02:00
Maxime Coste
34b8604f90 move context implementation to context.cc 2013-04-09 19:39:03 +02:00
Maxime Coste
829876a6fa Context: push_jump does not allow the same jump to be present multiple times 2013-04-09 14:29:28 +02:00
Maxime Coste
f540566b1b UserInterface: status line messages are now DisplayLines
This add color support for the status line
2013-04-04 18:50:00 +02:00
Maxime Coste
38a46a6682 add WinDisplay hook 2013-03-22 13:41:48 +01:00
Maxime Coste
fc2dd599a3 Move last insert state from context to input handler 2013-02-18 14:07:30 +01:00
Maxime Coste
00a9cdfc90 Context: remove some unused code 2013-01-29 23:16:58 +01:00
Maxime Coste
8933109cc5 Context: fix unintialized m_input_handler 2013-01-29 19:13:39 +01:00
Maxime Coste
94bbf47cd4 InputHandler have it's own context 2013-01-28 13:48:34 +01:00
Maxime Coste
12ce590f18 Context: add a hooks method similar to the options one 2013-01-14 19:26:44 +01:00
Maxime Coste
cfd7ee049a move selection updating code out of selection, to DynamicSelectionList
this avoids a lot of unnecessary (add|remove)_change_listener as
creating temporary Selections do not call that anymore.

Use can choose between a SelectionList which or a DynamicSelectionList
depending on wethear the buffer will be modified or not during the
selections lifetime.
2012-12-13 18:50:27 +01:00
Maxime Coste
b764a0a63e Selection: refactoring, move CaptureList to Selection 2012-11-30 18:32:49 +01:00