Commit Graph

2905 Commits

Author SHA1 Message Date
Maxime Coste
5c37f0dd5e Propagate shell context through prompt/onkey/menu commands 2015-11-18 20:15:51 +00:00
Maxime Coste
5743ea7384 Respect count argument on search 2015-11-18 20:13:03 +00:00
Maxime Coste
8d47cf0674 Fix correctly ncurses menu size computations and avoid divide by 0 2015-11-18 20:12:16 +00:00
Maxime Coste
6925ff33b1 Send client dimensions on connection, avoid a race condition.
Fixes #429
2015-11-18 13:43:43 +00:00
Maxime Coste
a37858ece7 Put count and register normal mode params in the shell context
'10:echo %val{count}' will display 10
Fixes #10
2015-11-17 23:47:59 +00:00
Maxime Coste
6bd71c68e5 NCurses: Fix max menu item width computation 2015-11-17 23:34:03 +00:00
Maxime Coste
cb108b248a Fix alias completion and overwritting 2015-11-17 13:55:27 +00:00
Maxime Coste
97cc166885 Try to restore the previously opened buffer when converting to client mode
Fixes #483
2015-11-16 13:52:33 +00:00
Maxime Coste
1bf0a964ce Move is_basic_alpha to unicode.hh 2015-11-15 13:24:39 +00:00
Maxime Coste
111732005a Support <c-v> to insert raw value in insert/prompt mode 2015-11-13 13:52:54 +00:00
Maxime Coste
67d1b7dcd1 Faster BufferIterator::operator++/-- 2015-11-12 13:59:36 +00:00
Maxime Coste
2113b829df Show an info box explaining that spaces disable history recording in command prompt
Fixes #477
2015-11-12 13:57:14 +00:00
Maxime Coste
d6168a90fc Fix access to dead temporary 2015-11-11 19:14:35 +00:00
Maxime Coste
b73a890f8c Document i attribute in face command info 2015-11-11 19:05:47 +00:00
Maxime Coste
a5c8437873 Remove unneeded conversion 2015-11-11 19:05:32 +00:00
Maxime Coste
892c3647e4 Fix to_lower/to_upper handling to correctly support non unicode chars
require a proper unicode locale setup on the system
Fixes #94
2015-11-11 00:21:20 +00:00
Maxime Coste
7bd3f4306d Remove useless checks, buffer has always at list one line 2015-11-10 23:06:57 +00:00
Maxime Coste
217dd6a1de Disable history when executing maps
Fixes #476
2015-11-10 21:24:47 +00:00
Maxime Coste
a0bcdd83df Document default registers 2015-11-10 20:39:17 +00:00
Maxime Coste
9134066e85 Try to switch to last buffer when removing the current one 2015-11-10 13:52:48 +00:00
Maxime Coste
53184829ee Avoid unneeded inc/dec rec in RefPtr::operator= 2015-11-10 13:50:15 +00:00
Maxime Coste
6e08716899 Refactor Normal input mode on_key method 2015-11-09 21:30:07 +00:00
Maxime Coste
6ecccf4119 Regex based normal mode command honor the selected register
They default to the '/' register for the default regex, but can
use another if specified with "<reg>
2015-11-09 21:28:18 +00:00
Maxime Coste
9b8e2526f9 Merge search hihglighter and regex option highlighter in dynregex 2015-11-09 09:34:03 +00:00
Maxime Coste
62c981fe2d Small tweak in DynamicRegexHighlighter 2015-11-09 08:50:17 +00:00
Maxime Coste
a2d78941ba Catch expression evaluation errors in line/column highlighters 2015-11-09 08:42:40 +00:00
Maxime Coste
12abb54a88 Slightly more performant regex capture gathering in select_all_matches 2015-11-09 08:42:12 +00:00
Maxime Coste
6840f7ce9c Store the last used buffer in clients
Fixes #474
2015-11-07 18:25:49 +00:00
Maxime Coste
6bb775241c Optimize BufferIterator to avoid a lot of pointer chasing 2015-11-07 16:55:48 +00:00
Maxime Coste
04c8334c98 Avoid useless StringDataPtr copy 2015-11-07 16:55:20 +00:00
Maxime Coste
28d451b844 Support 'current' scope in set/unset command 2015-11-06 13:56:48 +00:00
Maxime Coste
65e67b0656 Remove unused _ss UDL 2015-11-06 13:37:51 +00:00
Maxime Coste
33253a8fd5 Support 'V' for locked view control
Fixes #343
2015-11-05 13:40:40 +00:00
Maxime Coste
05f7337eb0 Change ncurses wheel down default button to 5 2015-11-05 13:28:58 +00:00
Maxime Coste
48a296dc71 Avoid an unneeded call to ensure_char_start 2015-11-04 20:10:12 +00:00
Maxime Coste
d6a2d77857 Fix double check_invariant in SelectionList construction, and set main selection to last 2015-11-04 19:53:47 +00:00
Maxime Coste
2ce0a5a8a8 Merge https://github.com/alpha123/kakoune 2015-11-04 19:49:21 +00:00
Maxime Coste
1c831b41da always_inline a few RefPtr operators 2015-11-04 19:47:26 +00:00
Maxime Coste
e82ca36117 Avoid unneeded sort_and_merge_ovelapping call in select_all_matches 2015-11-04 19:43:25 +00:00
Maxime Coste
719997f0ab Do not tag BufferIterator as random access
Boost regex considers that random access means fast distance
computation, which is not the case for BufferIterator where
Buffer::distance is O(num lines between them) which can get
big on large files.

Fixes #462
2015-11-04 01:01:52 +00:00
Maxime Coste
6273aa9443 Rework Buffer::distance implementation 2015-11-04 01:01:52 +00:00
alpha123
97c92368bc Build on FreeBSD 2015-11-03 11:51:27 -07:00
Maxime Coste
e8239feddf Minor cleanup in normal.cc 2015-11-03 13:59:05 +00:00
sinetek
4b8c03afe6 Adding support for DragonFlyBSD. 2015-11-03 01:14:34 +07:00
Maxime Coste
c8d2417646 Support horizontal centering in view commands (using m)
Fixes #442
2015-11-02 19:51:59 +00:00
Maxime Coste
17eef4a7dc Use explicit lambda captures 2015-11-02 13:44:03 +00:00
Maxime Coste
2bf44b6b49 Make word insert completion work better with unicode char 2015-10-30 13:57:46 +00:00
Maxime Coste
f556ef12c4 Fix preservation of entered text in option insert completer 2015-10-30 13:08:07 +00:00
Maxime Coste
34d7bdbc01 Minor code cleanup in insert_completer.cc 2015-10-30 13:07:48 +00:00
Maxime Coste
32b51e2cc3 Use ranked matches for option completion as well 2015-10-29 13:57:50 +00:00
Maxime Coste
8030897708 Merge branch 'master' into ranked-word-completion 2015-10-29 13:44:55 +00:00
Maxime Coste
24043bbffe Use an heuristic based match ranking algorithm inspired by what YouCompleteMe does 2015-10-29 13:36:30 +00:00
Maxime Coste
4b7b04bf59 Fix mouse scrolling up stopping at line 2
Fixes #448
2015-10-28 00:01:25 +00:00
Maxime Coste
89d22f3335 Move more logic into RankedMatch 2015-10-27 21:25:18 +00:00
Maxime Coste
2eba789610 Merge branch 'master' into ranked-word-completion 2015-10-27 13:33:15 +00:00
Maxime Coste
40c6edf243 Document exclusive attribute 2015-10-23 13:49:02 +01:00
Maxime Coste
5118e13aee Remove useless std::move 2015-10-23 13:46:55 +01:00
Maxime Coste
e7152bad56 Add an exclusive attribute that overrides existing face 2015-10-23 13:46:41 +01:00
Maxime Coste
1ba37bacd8 Fix optimized linkage 2015-10-23 09:49:06 +01:00
Maxime Coste
c77cb7c777 Extract WordDB::RankedWord as RankedMatch in its own file 2015-10-22 19:49:08 +01:00
Maxime Coste
da7fc3311f Pass ShellContext to commands
Fix #427
2015-10-22 13:59:23 +01:00
Maxime Coste
e51ef6c3c2 Wrap the shell params en env vars in a ShellContext struct 2015-10-22 13:48:57 +01:00
Maxime Coste
7346220e38 Fix :set completion when -add switch is given 2015-10-22 13:29:34 +01:00
Maxime Coste
5938712d1f Support :set -add on strings, using concatenation 2015-10-22 13:21:59 +01:00
Maxime Coste
019b3235b0 Remove legacy WordDB::find_matching method 2015-10-21 20:16:36 +01:00
Maxime Coste
2bf391f36d Sort insert completer words by name favoring lower case and then stable sort by rank 2015-10-20 13:50:55 +01:00
Maxime Coste
9449f763e0 Fix removal of duplicated words in insert completion 2015-10-19 19:39:05 +01:00
Maxime Coste
73e438be07 Fix handling of explicit insert completers 2015-10-19 13:43:23 +01:00
Maxime Coste
364914afbd Do not filter completions in InsertCompleter anymore
Just rerun the actual completers
2015-10-18 17:51:13 +01:00
Maxime Coste
4f2584a091 Experiment with ranked word completion depending on word boundaries 2015-10-18 16:55:21 +01:00
Maxime Coste
944d8f53fb Fix OSX compilation 2015-10-18 12:45:27 +01:00
Maxime Coste
2cd0ce41ac Do not try to extend last match when updating regex matches
It does not work well with regexes starting with a lookbehind, as
we would need to reparse from further away, leading to the last
match just being removed. It seems safer not to remove it, as
the motivating use case (multiline macros) is better left to
regions anyway.

Fixes #440
2015-10-18 11:37:04 +01:00
Maxime Coste
76fadd8108 More cleanups in the buffer open/reload code 2015-10-17 11:33:09 +01:00
Maxime Coste
fe704b9b84 Move line parsing and to Buffer.cc directly 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
776059a4c3 Fix double destruction of local ui 2015-10-14 13:21:27 +01:00
Maxime Coste
43fb216772 Remove unneeded constructor 2015-10-14 08:49:13 +01:00
Maxime Coste
572cf9d6b2 Fix file change detection not working in certain cases
Files opened from the command line where not handled correctly.
2015-10-13 19:31:24 +01:00
Maxime Coste
49557f5b17 Restore info box after a resize as well
Fixes #425
2015-10-13 13:58:39 +01:00
Maxime Coste
9f78f9bfd5 Try to restore menu after a resize 2015-10-13 13:52:02 +01:00
Maxime Coste
e5240ba4ff Fix NCursesUI::m_items not being empty after a resize
Fixes #435
2015-10-13 13:40:04 +01:00
Maxime Coste
2d7e99da98 Tweak file change checking timeout handling 2015-10-10 14:18:43 +01:00
Maxime Coste
50f5140cbd When displaying a prompt content with line break char, replace them with their unicode control picture 2015-10-09 13:55:55 +01:00
Maxime Coste
256e4d7862 NCursesUI: Remove color restoring support 2015-10-09 13:43:13 +01:00
Maxime Coste
a4447819e5 Fix OSX compilation 2015-10-09 13:41:28 +01:00
Maxime Coste
0d8b9c6677 Tweak handling of SIGINT 2015-10-08 20:23:32 +01:00
Maxime Coste
473196e18d Store color/color pairs mapping in the ncurses ui instance 2015-10-08 20:23:32 +01:00
Maxime Coste
bd01171861 Auto fork server when suspending the local client
That way, other clients can still be serviced by the server.
2015-10-08 20:05:47 +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
3098cd12f8 Check for terminal resize on SIGCONT
Fixes #423
2015-10-08 13:24:58 +01:00
Maxime Coste
5e4443812c Fix warning in ncurses_ui.cc 2015-10-06 21:15:13 +01:00
Maxime Coste
67646cd45a Cleanup insert_completer code and use markup for option completion menu entry 2015-10-06 13:37:16 +01:00
Maxime Coste
c41a7eed09 Fix display of path insert completion for absolute paths 2015-10-05 23:30:20 +01:00
Maxime Coste
31cc61b6fc Allow parsing empty strings as default color in face descs 2015-10-05 20:32:51 +01:00
Maxime Coste
db2fa6f5cb Support markup in menu command 2015-10-05 13:51:13 +01:00
Maxime Coste
69b16d814b Display word insert completion buffer name in a different color 2015-10-05 01:48:00 +01:00
Maxime Coste
c54e6738b9 Use DisplayLine for menu choices 2015-10-05 01:25:23 +01:00
Maxime Coste
38e9bf4f96 Fix OSX compilation 2015-10-03 11:21:35 +01:00
Maxime Coste
f7ba2a896c Tweak ui_options docstring 2015-10-02 13:56:19 +01:00
Eike Plack
faa3b3b173 Add self documentation to ui_options
* For now the non ui code will hold this information. Ideally the UI would
be able to describe its options in some way.
2015-10-02 13:54:08 +01:00