Commit Graph

245 Commits

Author SHA1 Message Date
Maxime Coste
b58f614f40 Pass a fg and bg color when displaying a menu 2013-04-04 14:04:38 +02:00
Maxime Coste
161fab13f7 complete_opt: accept an optional length in completion desciptor 2013-04-02 19:57:39 +02:00
Maxime Coste
01968cb96e String: inherit from std::string rather than using it as a backend 2013-03-29 19:35:48 +01:00
Maxime Coste
96b017f76e Minor BufferCompleter refactoring 2013-03-29 19:35:47 +01:00
Maxime Coste
dfa5318765 fix some style problems detected by cppcheck 2013-03-25 18:44:52 +01:00
Maxime Coste
3f467ba451 BufferCompleter: preserve completions when inserting
try to narrow matches with entered prefix
2013-03-20 19:11:58 +01:00
Maxime Coste
9c78f02903 BufferCompleter: fix backward looping in completion candidates 2013-03-19 14:15:42 +01:00
Maxime Coste
a981d41cde Editor: replace selections().back() with main_selection() 2013-03-15 18:22:08 +01:00
Maxime Coste
09e30c40e3 BufferCompleter: watch 'completions' option, and update completions when it changes 2013-03-12 19:23:41 +01:00
Maxime Coste
ddc894ccfe Add an experimental configurable input completion fonction
The completions option (a std::vector<String>) is used for
completions candidates, if it's first element matches the current
cursor position and buffer timestamp.
2013-03-11 14:20:28 +01:00
Maxime Coste
8cc9a44d47 minor cleanups in complete_word 2013-03-11 14:20:28 +01:00
Maxime Coste
eab2cc240a InputHandler: complete_word knows best when not to complete 2013-03-09 13:23:47 +01:00
Maxime Coste
89ba8535e2 InputHandler: extract word completion algorithm 2013-03-08 18:43:14 +01:00
Maxime Coste
09cf5acb23 Add support for boolean options 2013-03-05 19:03:42 +01:00
Maxime Coste
fac222a427 Strongly typed options support
* non builtins options require declaration using the decl command

* At the moment, only int and string options are supported, however
the goal of this change is to provide a consistent way to support
more complex options, namely lists and booleans
2013-03-05 18:49:26 +01:00
Maxime Coste
9306a89deb Fix macro recording on the same register, replace instead of appending. 2013-02-21 13:34:34 +01:00
Maxime Coste
c451dd07c6 InputHandler: do not put empty lines in history 2013-02-19 19:04:36 +01:00
Maxime Coste
a453ddaf37 Add support for Home/End key in prompts 2013-02-19 13:50:27 +01:00
Maxime Coste
b43fdc7eb6 Add macro recording/replay support 2013-02-18 18:58:07 +01:00
Maxime Coste
9936ace0db input_handler: ask dimensions to ui instead of window 2013-02-18 14:13:52 +01:00
Maxime Coste
fc2dd599a3 Move last insert state from context to input handler 2013-02-18 14:07:30 +01:00
Maxime Coste
c9b113fd5f InputHandler: add some new hooks 2013-01-30 19:04:03 +01:00
Maxime Coste
2235944e60 Add NormalIdle hook support 2013-01-29 13:58:19 +01:00
Maxime Coste
38a67e72bc Do not pass a context to InputHandler methods 2013-01-29 13:49:01 +01:00
Maxime Coste
94bbf47cd4 InputHandler have it's own context 2013-01-28 13:48:34 +01:00
Maxime Coste
9c2bbe218b replace char: fix unicode handling 2013-01-17 19:49:48 +01:00
Maxime Coste
d1f15123e4 InputHandler: minor code cleanup 2013-01-17 14:22:24 +01:00
Maxime Coste
c45838cc57 Move Insertion Hooks handing to the input handler 2013-01-17 13:58:57 +01:00
Maxime Coste
93cad94330 InputHandler: Insert mode calls 'InsertIdle' hook when idle 2013-01-15 14:15:12 +01:00
Maxime Coste
a1998dac7a InputHandler: use a timer for word completion instead of calling it at each insertion 2013-01-14 19:17:37 +01:00
Maxime Coste
d208067589 InputHandler: call callback on abort and on selected element change as well 2012-12-14 19:38:11 +01:00
Maxime Coste
92c4a9abce Prompt: when completion has only one candidate, next tab starts a new completion 2012-12-13 18:49:29 +01:00
Maxime Coste
afc8ad77e8 InputHandler: tweak prefix completion behaviour 2012-12-07 19:20:26 +01:00
Maxime Coste
b81ea0bc92 PromptHandler now call callback when edited and aborted.
Used for a new feature: incremental search
2012-12-06 13:33:26 +01:00
Maxime Coste
33482b0979 Add configurable prompt completion behaviour
If option 'complete_prefix' is non 0, then completion first
use completion candidates common prefix, then circle through
candidates.
2012-11-29 19:56:34 +01:00
Maxime Coste
7dc634444d Fix InputMode::Prompt blocking behaviour when inserting register 2012-11-29 19:03:17 +01:00
Maxime Coste
4c1b48e314 InputHandler: InputModes no longer die directly on mode change, they survive until end of on_key 2012-11-27 18:52:43 +01:00
Maxime Coste
557128b641 IncrementalInsert::move_cursors: use overloaded for LineCount/CharCount editor implementation 2012-11-26 19:38:07 +01:00
Maxime Coste
0887e1364e InputHandler: Handle C-c as Escape 2012-11-08 14:05:00 +01:00
Maxime Coste
3daac4883e Move client drawing responsiblity to the ClientManager 2012-11-05 19:58:04 +01:00
Maxime Coste
945f54daea fix crashes when cycling through menu with an active filter 2012-10-29 19:17:37 +01:00
Maxime Coste
cc876f7107 validate key in InputHandler before sending to mode, and minor refactor 2012-10-29 18:59:41 +01:00
Maxime Coste
d9729cc29e Handle all available input before redrawing 2012-10-28 09:26:54 +01:00
Maxime Coste
abf514f305 avoid utf8 errors with invalid keys, like ncurse KEY_RESIZE 2012-10-18 19:56:57 +02:00
Maxime Coste
4aa3a36102 rename Client to InputHandler 2012-10-17 13:14:03 +02:00