Maxime Coste
74fe8b5e8d
Remove Context::numeric_param, pass it directly to normal mode functions
2013-10-10 21:22:20 +01:00
Maxime Coste
307fc228d2
Add <c-u> in insert mode for forcing commiting the current undo group
2013-10-02 18:45:39 +01:00
Maxime Coste
5ae43acf94
Add prefix_match function and use it instead of adhoc code
2013-09-23 21:16:25 +02:00
Maxime Coste
7fef7ec063
Add a InputMode::on_replaced virtual method.
...
Destructors are not a good place to run mode exit hooks, as they
wont be called until the next mode trash clearing, so we now call
this virtual method on the previous mode just before it gets replaced.
2013-09-16 19:38:28 +01:00
Maxime Coste
168b4b775b
Do not clear Client::m_mode_trash in handle_key, but in handle_available_input
...
handle_key can be called from exec_keys while running a hook, and a previous
key in exec_keys could have changed the mode. This would make the mode that
runned the hook deleted when the controls returns to it.
handle_available_input should always be called at top level, so can safely
clear the mode trash.
2013-09-16 19:25:18 +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
49903523a7
Resurect Client::handle_available_input()
2013-09-16 18:48:41 +01:00
Maxime Coste
823812fd1a
rename InputHandler to Client
2013-09-12 23:47:23 +02:00
Maxime Coste
4aa3a36102
rename Client to InputHandler
2012-10-17 13:14:03 +02:00
Maxime Coste
4be6882bd5
Menu: support searching through choices with /
...
when hitting / while in a menu, a regex filter can be entered so that only
entries matching it are selectable, <esc> disable filtering while a second
<esc> close the menu as usual.
2012-10-15 12:49:46 +02:00
Maxime Coste
148466c659
Extract basic line editing functionality from PromptMode to LineEditor
2012-10-14 16:24:35 +02:00
Maxime Coste
4210a17753
Client: never call substr(CharCount, String::npos);
2012-10-11 14:22:08 +02:00
Maxime Coste
c92077762c
Makefile: add -Wall to CXXFLAGS
2012-10-11 01:17:29 +02:00
Maxime Coste
0ce6bd9bf5
use ByteCount instead of CharCount when we are really counting bytes
...
(that is most of the time when we are not concerned with displaying)
2012-10-11 00:41:48 +02:00
Maxime Coste
7a8366da2b
add a unicode.hh header for Codepoint related functions, s/utf8::Codepoint/Codepoint/
2012-10-09 19:15:05 +02:00
Maxime Coste
e1d4215159
InsertMode insert the whole utf8 representation of a codepoint
2012-10-09 14:31:00 +02:00
Maxime Coste
bff015d5b9
WordCompleter: avoid word currently being edited
2012-10-08 19:14:48 +02:00
Maxime Coste
bd0805cf3e
autoenable word completion while inserting
2012-10-01 14:23:04 +02:00
Maxime Coste
29b72b3e24
Add a word completing functionality to insert mode (wip)
2012-09-30 16:24:06 +02:00
Maxime Coste
5b6cb500fc
Menus can be placed anywhere on the screen, and takes a style parameter
...
This paves the way for insert mode completion menu using the current
prompt menu system.
2012-09-30 15:18:37 +02:00
Maxime Coste
a2fd1528e6
Move last insertion from Client to Context
2012-09-26 20:07:06 +02:00
Maxime Coste
efc069b531
Extract IncrementalInserter::Mode as InsertMode
...
move ClientMode classes in a namespace due to InsertMode name collisions
2012-09-26 14:22:24 +02:00
Maxime Coste
f76323f56e
Move UserInterface out of Client into Context
2012-09-26 14:13:04 +02:00
Maxime Coste
747c14c19f
Hide more Client Mode code in the cpp
2012-09-24 19:39:40 +02:00
Maxime Coste
a312ce6dc2
extract Client virtual methods to a UserInterface class
2012-09-24 19:24:27 +02:00
Maxime Coste
0380c999c3
move Client::Mode class definition in client.cc
2012-09-24 14:03:04 +02:00
Maxime Coste
00e357ed56
PromptMode: fix completion of non-last parameters
2012-09-17 13:37:08 +02:00
Maxime Coste
6f6f10c83d
simplify tab completion code in Client::InsertMode
2012-09-12 19:09:27 +02:00
Maxime Coste
cfbe32f6a2
support Tab/BackTab keys in MenuMode as well
2012-09-12 14:25:14 +02:00
Maxime Coste
9dfccddca8
Correctly handle arrow keys in insert mode
2012-09-11 19:09:14 +02:00
Maxime Coste
ee4c6b04a6
Support Shift-Tab in prompt mode to go back in completions
2012-09-11 14:27:21 +02:00
Maxime Coste
499bb77491
Cleanup Key handling, use symbolic names for function keys
2012-09-07 20:22:19 +02:00
Maxime Coste
1e18dcba0f
fix Client::repeat_last_insert when no last insert
2012-09-07 14:28:27 +02:00
Maxime Coste
16e1c2daf9
simplify menu api
2012-09-05 19:02:06 +02:00
Maxime Coste
bf42d77469
Handle inserting in Client::InsertMode
2012-09-05 14:27:14 +02:00
Maxime Coste
d4446d1525
Client: fix history search
2012-09-05 00:52:09 +02:00
Maxime Coste
b23425764e
Add client::on_next_key method to run some code when the next key arrives
2012-09-05 00:21:19 +02:00
Maxime Coste
63f467081a
Prompt: use entered text as prefix for history search
2012-09-04 13:48:04 +02:00
Maxime Coste
2e339e92bb
Allow arrow keys in prompt mode
2012-09-04 00:07:13 +02:00
Maxime Coste
57b89099ec
Client::MenuMode wrap through options with j/k Ctrl-n/Ctrl-p and tab
2012-09-04 00:02:50 +02:00
Maxime Coste
c4dd6b4038
Client::MenuMode map tab as SelectNext
2012-09-03 23:55:11 +02:00
Maxime Coste
c61f9cbe6b
Add MenuCommand::SelectNone and use it when tab completions goes back to original string
2012-09-03 19:34:10 +02:00
Maxime Coste
c2a4f68899
NCurses: Fix menu display
2012-09-03 19:20:41 +02:00
Maxime Coste
b08d8719e6
move input handling, including menu and prompt, to the Client class
2012-09-03 14:22:02 +02:00
Maxime Coste
c1fcc593a1
Store the current client in context
2012-08-15 22:36:45 +02:00
Maxime Coste
4dc9973288
Registers need a context to return their values
2012-08-05 20:13:41 +02:00
Maxime Coste
9b6b6b6b17
Rename UI to Client
2012-06-28 14:11:43 +02:00