Maxime Coste
689494fb2f
Fix reentrency in Normal::handle_key
2015-08-20 19:16:14 +01:00
Maxime Coste
baf0203b9d
Default register is not handled by the Normal input mode.
...
Normal input mode will just pass 0 as the reg if it was not specified
by the user, its yank/paste functions that should determine 0 means
use '"' register.
2015-08-19 13:41:16 +01:00
Maxime Coste
3f493fa186
Rename Disableable to more general NestedBool
...
A NestedBool can be set multiple times, and will be considered false
only when unset the same number.
2015-08-18 23:17:56 +01:00
Maxime Coste
f2580a366d
Cleanup key to codepoint conversion
...
Fixes #378
Fixes #365
2015-08-18 00:19:14 +01:00
Maxime Coste
043ca99983
Cleanup mouse handling a little
2015-08-16 14:06:07 +01:00
Maxime Coste
92d3178305
Clamp m_anchor in mouse handler, nothing garantees that it is still valid
...
Fixes #350
2015-08-14 13:12:44 +01:00
Maxime Coste
7086135fa6
Display auto info on register insertion/explicit insert completion
2015-08-11 20:36:07 +01:00
Maxime Coste
8d9c402f52
Handle registers insert/explicit completion with a nested on_next_key mode
2015-08-11 13:55:56 +01:00
Maxime Coste
9d50dd3886
Use a struct rather than a std::pair for InputHandler::Insertion
2015-08-08 22:46:11 +01:00
Maxime Coste
1af82e2e24
Tweak regex constructor calls
2015-07-25 11:15:03 +01:00
Maxime Coste
883a14e853
Do not allow exiting insert mode while running InsertEnd hook.
...
Fixes #311
2015-07-08 13:53:19 +01:00
xificurC
fbb216d2ed
commands starting with horizontal whitespace don't go into the history
2015-06-30 16:06:49 +02:00
Maxime Coste
3fb783f7f9
Add <a-;> in insert mode to execute a single normal mode command
2015-06-12 13:56:11 +01:00
Maxime Coste
f39b450e94
on_enabled might change mode, so assert Normal mode before
2015-06-04 13:56:08 +01:00
Maxime Coste
f0886ad323
Get rid of the mode trash, delete mode directly when leaving on_key
2015-06-03 20:03:06 +01:00
Maxime Coste
964b0e9a6e
InputHandler now uses a stack for active modes
...
instead of having a single mode enabled, modes can be pushed/poped,
with the top of the stack being the active mode.
2015-06-02 20:56:57 +01:00
Maxime Coste
8f6fc6a0f3
Port even more code to use format function
2015-06-01 21:15:59 +01:00
Maxime Coste
bbefde9379
Move Colors enum class as NamedColor enum inside Color struct
2015-04-25 10:47:39 +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
bf02838816
Remove is_blank, which is identical to is_horizontal_blank
2015-04-15 00:34:00 +01:00
Maxime Coste
195b813b73
Add support for Home/End keys in normal and insert mode
...
Fixes #260
2015-03-27 13:33:14 +00:00
Maxime Coste
323b0359c7
Add support for mouse wheel
2015-03-22 12:17:01 +00:00
Maxime Coste
5eaf472fc0
Experimental support for mouse
2015-03-22 11:41:20 +00:00
Maxime Coste
def33de9bc
Check modifiers before inserting codepoints in the line editor
2015-03-22 11:41:19 +00:00
Maxime Coste
3921b234e7
Store fake keystrokes when selecting an insert completion candidate
...
Instead of storing the real 'select next completion' keystroke,
generate fake backspace/delete/char keystrokes so that replay
of the insert will insert the exact same text.
Fixes #135
2015-03-15 18:44:11 +00:00
Maxime Coste
adcb72e987
Minor code cleanup
2015-03-14 11:11:01 +00:00
Maxime Coste
1a7d50b347
Minor cleanup
2015-03-12 20:40:00 +00:00
Maxime Coste
3c1a325b6f
Refactor String, use a common StringOps interface, hide std::string
2015-03-10 19:50:22 +00:00
Maxime Coste
1cec8df45e
ArrayView content is not const anymore
...
As in upcoming std c++ array_view, ArrayView<T> points to mutable
data, use ArrayView<const T> or alias ConstArrayView<T> for const
data.
2015-03-09 13:54:09 +00:00
Maxime Coste
0bbaef6e48
Use a sorted array for keymap rather than an unordered map
...
with ~100 entry, a binary search finds in < 7 step, unordered map
is overkill.
2015-03-08 11:40:50 +00:00
Maxime Coste
c0e4268e17
Reactivate direct file change check on entering normal mode
2015-03-04 20:46:26 +00:00
Maxime Coste
8c843f5bea
Add <a-h>, <a-l>, <a-x> and <a-d> bindings to line editor
...
<a-h> : move cursor left
<a-l> : move cursor right
<a-x> : delete char before cursor
<a-d> : delete char under cursor
2015-02-13 19:13:44 +00:00
Maxime Coste
224f73d72a
Cleanup and refactor externally modified buffer reloading
...
* Correctly hide the reload dialog in every client.
* Correctly handle buffer being deleted.
2015-02-12 19:18:03 +00:00
Maxime Coste
ffff4711c5
Add history memory domain
2015-01-28 22:33:29 +00:00
Maxime Coste
da562e03a0
replace all std::vector with Vector
2015-01-12 13:58:41 +00:00
Maxime Coste
295a97f2a6
Rename memoryview to ArrayView
2015-01-06 13:43:37 +00:00
Maxime Coste
e911c86306
Remove useless code
2014-12-22 20:08:30 +00:00
Maxime Coste
116ea7364a
Restore some special behaviours, I missed them in interactive mode.
2014-12-19 13:58:33 +00:00
Maxime Coste
1c8ee78d1a
Do not register timers for transient input handlers
2014-12-18 23:12:58 +00:00
Maxime Coste
ebecd60eb8
Rework hashing, use a more extensible framework similar to n3876 proposal
...
std::hash specialization is a pain to work with, stop using that, and
just specialize a 'size_t hash_value(const T&)' free function.
2014-12-16 18:57:19 +00:00
Maxime Coste
2c4ed3a78c
Do not avoid eol on escape
2014-12-11 19:36:20 +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
77e2e8a31e
Support selecting yank/paste register with "
2014-11-28 13:58:36 +00:00
Maxime Coste
35b89d5b87
Display selection count in insert mode line
2014-11-24 13:26:42 +00:00
Maxime Coste
88def85d77
Do not merge overlapping selections in InputMode::Replace
...
Fixes #237
2014-11-22 21:20:29 +00:00
Maxime Coste
f56b6ed75b
Do not record keys that were not user generated
2014-11-21 19:00:34 +00:00
Maxime Coste
3f733569ed
Fix case where a context ends up locked in no-hooks mode
2014-11-12 20:31:12 +00:00
Maxime Coste
f6e9018bf0
Reduce idle timeout to 50 milliseconds
2014-11-11 23:32:52 +00:00
Maxime Coste
88aa707b9c
For {Menu,Info}Style::Prompt, choose the anchor directly in ncurses code
2014-11-08 19:08:23 +00:00