Maxime Coste
dcd8f6ef01
Apply clang-tidy modernize to the codebase
2017-01-08 22:39:01 +00:00
Maxime Coste
b3674a2f03
Add Modal
InfoStyle used for bufer reload info box
...
Modal info style wont be replaced by other info boxes.
NCursesUI will center that info box.
Fixes #1060
2017-01-04 11:39:51 +00:00
Maxime Coste
03eb128536
Ensure content of expanded strings in modelinefmt is not interpreted as markup
2016-12-07 20:07:32 +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
b337f99ca7
Add a 'keys' debug flag, showing the keystrokes comming to clients
2016-11-26 13:29:17 +00:00
Maxime Coste
bc2d79d302
Run WinDisplay hook on creation of clients
...
Fixes #913
2016-11-03 19:09:52 +00:00
Maxime Coste
a7cac87753
Display a status line message when Kakoune is waiting on a shell to complete
...
If a shell commands takes more than 1s to execute, a message will appear
on the status line notifying the user, along with the time Kakoune has
been waiting for.
2016-10-29 11:25:58 +01:00
Maxime Coste
cc2affea11
Always allow to delete a buffer, just recreate a scratch buffer if needed
...
Fixes #850
2016-10-13 21:37:44 +01:00
Maxime Coste
35559b65dd
Support codepoints of variable width
...
Add a ColumnCount type and use it in place of CharCount whenever
more appropriate, take column size of codepoints into account for
vertical movements and docstring wrapping.
Fixes #811
2016-10-01 13:45:00 +01:00
Maxime Coste
e3c4bddd3b
Make hook disabling work for all hooks, not only user hooks
...
Fixes #823
2016-09-26 23:43:05 +01:00
Maxime Coste
4fc20b8d7d
Rework client quitting and handling of remote errors
...
Client quitting no longer immediately unwinds, client is just pushed
for deletion until we get back to the main loop, similarly to what
happens for buffer and window deletion.
2016-09-04 17:56:07 +01:00
Maxime Coste
439f168928
Use named keys for Return and Tab instead of <c-m> and <c-i>
...
Fixes #722
2016-07-05 20:08:13 +01:00
Maxime Coste
34c8e6a9cf
Clear up info/menus and eventual prompts when reseting to normal mode
...
Fixes #697
2016-06-16 19:35:43 +01:00
Maxime Coste
3b6d6956e2
We do need a force redraw on resize for menu, info and status bar
2016-05-16 10:23:47 +01:00
Maxime Coste
ba421e45f7
Delay window deletion until we get back to main loop
...
Avoid WinResize hooks while redrawing, ensure window resize only
take place while handling user input.
Fixes #672
2016-05-14 08:17:52 +01:00
Maxime Coste
d3aff03062
Keep a pointer to current client in windows so that window hooks can access it
2016-05-09 13:48:48 +01:00
Maxime Coste
815924e4da
Merge remote-tracking branch 'lenormf/buffer-padding'
2016-04-11 13:44:10 +01:00
Maxime Coste
9b4bd611ef
Replace menu and info when they actually moved
...
Previous logic worked only when the buffer moved in the window, but
not if some highlighter (like line numbering or flag lines) moved
the text around.
2016-03-30 19:46:43 +01:00
Maxime Coste
9e15181dc9
Rework container helpers, use pipe syntax and cleanup implementation
...
use 'container | filter(func) | reverse() | transform(func)' instead
of 'transform(reverse(filter(container), func), func)' to express
container transformations.
2016-03-08 21:35:56 +00:00
Maxime Coste
3cbc0d0b39
Force redraw everything, not just refresh
2016-03-08 13:42:00 +00:00
Maxime Coste
6c8f8fe691
Rework client redrawing, delay menu/info methods until next refresh
...
That avoid sending lots of spurious info_hide/menu_hide, just set
a flag and wait until the client is asked to redraw.
2016-03-07 23:11:59 +00:00
Maxime Coste
2626ce858f
Move <c-l> handling to normal mode from client
...
Client handling prevents :exec from triggering a redraw
2016-03-07 22:14:03 +00:00
Maxime Coste
f1fb2114da
Handle <c-l> redrawing on the server side
...
That way we can force a redraw at any moment, including during
batch execution.
2016-03-07 21:44:50 +00:00
Maxime Coste
72b6340b35
Only call UserInterface::refresh when the UI has been modified
2016-03-06 15:12:36 +00:00
Maxime Coste
068ca08b4c
Use the general code path for reload info box handling in Client
2016-03-02 13:14:21 +00:00
Maxime Coste
3987463e75
Remove direct access to ui, go through client
...
Client can now update menu/info positions when the window move
around.
2016-02-27 17:23:13 +00:00
Frank LENORMAND
f408cf7ed3
Allow users to chose how the buffers are padded
2016-02-17 15:48:09 +02:00
Maxime Coste
d2b0dba39d
Support quitting while executing RuntimeError hooks
...
Fixes #529
2015-12-14 19:06:30 +00:00
Maxime Coste
5e4f5cd2a0
Move enum option handling in enum.hh and refactor enum options
2015-11-20 09:06:53 +00:00
Maxime Coste
6840f7ce9c
Store the last used buffer in clients
...
Fixes #474
2015-11-07 18:25:49 +00:00
Maxime Coste
76fadd8108
More cleanups in the buffer open/reload code
2015-10-17 11:33:09 +01:00
Maxime Coste
3795ff735a
Refactor buffer creation and reloading to be more explicit
...
Reloading used to be implicit in the buffer creation function,
which is not always nice, as code that explicitely wanted to
reload a buffer could not say so.
2015-10-17 11:33:09 +01:00
Maxime Coste
7776c38755
Detect ungraceful exits, and backup modified buffers in these cases
2015-10-08 13:43:39 +01:00
Maxime Coste
e2720f1fbe
Store timespec for buffer fs timestamps, not just time_t
...
time_t has a resolution of one second, which cause troubles when
a file changes multiple time during that same second.
2015-09-27 11:55:34 +01:00
Maxime Coste
2b4b73ae8e
Remove the default_face parameter of parse_display_line
...
No need to define a default face there, we will pass a default face
to UserInterface::draw_status later.
2015-09-20 11:34:13 +01:00
Maxime Coste
f59108072f
Initial support for user configurable modeline with the modelinefmt option
...
modelinefmt is first sent through a command line expander (so %sh{...},
%val{...} et al. are expanded), then through markup expand (so that
{face} are interpreted as well)
2015-09-19 12:43:39 +01:00
Maxime Coste
d2c4d22d1f
Keep it simple, remove all that sorted id map thing
2015-09-18 13:52:32 +01:00
Maxime Coste
36828e6059
IdMaps can be sorted, in which case the find method uses a binary search
2015-09-16 22:22:51 +01:00
Maxime Coste
693d9a4861
Store key hash in IdMap
2015-09-16 20:02:12 +01:00
Maxime Coste
0755366cb1
Rework resize handling
...
Fixes #383
2015-08-23 15:18:18 +01:00
Maxime Coste
ae839fc471
Remove Client::window() method, use a force_redraw() one
...
We cannot assume Client::m_window is always non-null, as when
changing current buffer its temporarily null, at the point
where WinCreate hook might get called.
Fixes #382
2015-08-23 13:29:24 +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
3019118b10
Style tweak in client.cc
2015-07-22 13:30:03 +01:00
Maxime Coste
10f4bb5872
Add support for FocusIn/FocusOut events from UI
2015-07-15 13:56:31 +01:00
Maxime Coste
3fe8446065
Use StatusLine face as default for the status line
2015-06-29 22:48:26 +01:00
Maxime Coste
fa4c486b69
Always redraw status when redrawing the main window
...
That is needed so that on resize the status line does not disappear
2015-06-24 13:35:46 +01:00
Maxime Coste
7e6b02f26a
Refactor slightly window redrawing
2015-06-22 13:34:22 +01:00
Maxime Coste
3834440298
Rework window redraw handling, should redraw window less often
2015-06-21 19:56:23 +01:00