Commit Graph

3366 Commits

Author SHA1 Message Date
Maxime Coste
a320dcec28 Small formating fix 2016-12-06 23:08:18 +00:00
Maxime Coste
e9349cdc92 Ensure timers are still alive when trying to run them 2016-12-06 13:55:53 +00:00
Maxime Coste
b3ac733f33 Fix buffer reload info box not being shown anymore 2016-12-05 23:40:23 +00:00
Maxime Coste
9a986b8d47 Hide eventual info box when returning to normal mode 2016-12-04 23:27:04 +00:00
Maxime Coste
4d538fb423 Only hide menu/info if the insert completer did display it
Avoid hiding info boxes opened by other places in the code.
2016-12-04 13:37:33 +00:00
Maxime Coste
e2fae522e5 Small include fix 2016-12-03 13:18:11 +00:00
Maxime Coste
bc8c5522e2 Change ValueId to just be an enum class, it does not need any operators 2016-12-03 13:17:42 +00:00
Maxime Coste
8a74ef9804 Read as much as possible data from shell processes on each read event
We were reading at most 1024 bytes every time, going back to the event
loop.
2016-12-03 12:41:36 +00:00
Maxime Coste
75986911f8 Refactor RefPtr handling to use a policy class
THe previous overload based system was pretty complex for no good
reason.
2016-12-03 12:32:16 +00:00
Maxime Coste
5ff8245cc8 Display non breaking spaces with ⍽ in show_whitespaces hihglighter
Fixes #167
2016-12-02 13:59:34 +00:00
Maxime Coste
089ee8ac0a Fix crash when quitting the first client while another client is connected 2016-12-01 20:55:28 +00:00
Maxime Coste
a65e8142f3 Rework handling of initial coordinates so that init commands can change them
Fixes #944
2016-12-01 20:55:20 +00:00
Maxime Coste
8c862c4eea Only write to remote socket when we know they are writable
Buffer data (in an horribly innefficient way for now), and use the
event manager to watch for the socket being ready for a write.

Fixes #945
2016-12-01 20:11:09 +00:00
Maxime Coste
95c1528342 Fix crash when a client sends a packet advertising a wrong size
If the given size is less than the header size, the message is
clearly invalid, disconnect the client in that case.
2016-12-01 19:45:23 +00:00
Maxime Coste
7defdd3039 Make FDWatcher support Read, Write and Except events, instead of just Read 2016-12-01 19:44:07 +00:00
Maxime Coste
99a3388e41 Hide the waiting for shell message once the shell returns 2016-11-30 13:46:20 +00:00
Maxime Coste
61b3dfd184 Use a Timer for Shell waiting notification
Without a timer we were relying on other event sources to wake us
up to display the information, which was usually a NormalIdle or
a filesystem check timer.
2016-11-30 09:55:05 +00:00
Maxime Coste
540e504e68 Ensure all available input is handled before going back to main loop
We were not handling keys that could have been generated while handling
other keys (like during a shell evaluation).
2016-11-30 09:47:38 +00:00
Maxime Coste
3a81260917 Simplify greatly UI input handling
This round trip through an input callback expected to call
is_key_available and get_key was overcomplicated, just send the
keys as they arrive, the client is already buffering due to urgent
event mode.
2016-11-29 21:59:36 +00:00
Maxime Coste
2fd1414b05 Clean up includes of user_interface.hh 2016-11-29 19:53:11 +00:00
Maxime Coste
0dff8a7d3f Small remote code cleanup 2016-11-29 19:52:57 +00:00
Maxime Coste
db86c6cbc9 Small cleanup in BufferManager code 2016-11-29 19:12:10 +00:00
Maxime Coste
12856066b1 Cleanup include dependencies a bit 2016-11-28 23:58:08 +00:00
Maxime Coste
da6d7f4530 Always consider end of selection is not and eol for keep
Fixes #921
2016-11-28 21:07:24 +00:00
Maxime Coste
719eb16a5e Fix matching flags not being forwarded to regex_search
Still does not fully fix #921
2016-11-28 20:02:40 +00:00
Maxime Coste
2f3a7112ea Add more memory domains to certain data 2016-11-28 13:59:55 +00:00
Maxime Coste
54d540021c Add support for mouse in insert mode
Fixes #940
2016-11-28 13:15:12 +00:00
Maxime Coste
a4738ace5f :prompt and :onkey (renamed :on-key) now use values instead of registers
:prompt provides the entered text in the `text` value, :on-key provides
the entered key in the `key` value.

Closes #938
2016-11-27 20:57:04 +00:00
Maxime Coste
b337f99ca7 Add a 'keys' debug flag, showing the keystrokes comming to clients 2016-11-26 13:29:17 +00:00
Maxime Coste
e340e0ed39 Forward client name to contexts created for write-all
Fixes #937
2016-11-24 13:35:42 +00:00
Maxime Coste
8f2c6eb586 Fix write_all_buffers when BufWrite... hooks create/delete buffers
The buffer list can be mutated during iteration, so it is no safe
to directly iterate on the BufferManager, we need to first create
our own copy of the buffer list.

Fixes #935
2016-11-23 23:51:16 +00:00
Maxime Coste
b884b499dd Rework ensure_all_buffers_are_saved to remove an unneeded Vector 2016-11-23 23:39:42 +00:00
Maxime Coste
1ccccbce04 Fix horrible leak in String::Data::operator=(String::Data&&)
And that, my friends, is why we recommend using standard containers
instead of rolling your own.
2016-11-23 01:09:09 +00:00
Maxime Coste
03dcfb2574 Small code tweak 2016-11-23 00:22:37 +00:00
Maxime Coste
ca0606017f Small code refactoring 2016-11-22 23:51:09 +00:00
Maxime Coste
3f3ed0b333 Fix literal type that must be 64 bits 2016-11-22 22:20:30 +00:00
Maxime Coste
d15cc02c01 Remove some unneeded headers from ncurses_ui.cc 2016-11-22 09:49:55 +00:00
Maxime Coste
0b806cd4f1 Add missing hooks to completion list and validate hook name in hook cmd 2016-11-21 09:51:47 +00:00
Maxime Coste
be03fdce2a Support completing hook names
Fixes #879
2016-11-20 11:17:13 +00:00
Maxime Coste
cd8d51af34 Fix PerArgumentCommandCompleter when completing the non first arg
The actualy query passed was always the first argument.
2016-11-20 11:16:34 +00:00
Maxime Coste
47a82b9855 Make ArrayView::subrange size arguement optional 2016-11-20 11:15:15 +00:00
Maxime Coste
67eb19c6d2 Only rely on ignored_files option to remove hidden files, no built in logic
Fixes #929
2016-11-18 09:38:48 +00:00
Maxime Coste
4a2fea8c9e Continue command renaming to improve consistency 2016-11-15 13:49:06 +00:00
Maxime Coste
6d79ade019 Tweak RankedMatch behaviour and fix bug in its comparison function
casting TestableFlag<T> to UnderlyingType<T> was going through bool
conversion... Not sure how things worked earlier.
2016-11-14 19:39:35 +00:00
Maxime Coste
b3ba769220 Propagate the hooks disabled state through prompt, menu, and command execution
Maintain it as well during buffer creation even if the hooks are not executed
in client context.

Fixes #818
2016-11-14 19:39:35 +00:00
Maxime Coste
c2989704d5 More correct handling of SIGHUP while suspended
Fixes #833
2016-11-14 00:49:34 +00:00
Maxime Coste
5249df78d4 Do not include aliases in command completion candidates anymore
Fuzzy matching makes it redundant.
Closes #817
2016-11-14 00:29:43 +00:00
Maxime Coste
dcd733e5fa Do a first phase of command renaming 2016-11-14 00:27:14 +00:00
Maxime Coste
9d9beb7e3a Pass regex flags on keep matching/not matching
Related to #921
2016-11-12 18:03:54 +00:00
Maxime Coste
8490caa0d7 Add support for <a-Z> appending current selections to the given register 2016-11-09 13:57:05 +00:00