Maxime Coste
093d3bd0df
Map tab to jump forward until we can distinguish <c-i> from it
...
Fixes #769
2016-08-27 11:07:24 +01:00
Maxime Coste
85f54a77ac
Display the capture used in select/split prompt
...
Fixes #770
2016-08-27 10:55:07 +01:00
Maxime Coste
2bf100bdd0
Add a to_string overload for unsigned int
2016-08-27 10:46:49 +01:00
Maxime Coste
7ac54b0b0f
Fix another bug in wrap_lines
2016-08-26 00:08:34 +01:00
Maxime Coste
9124851029
JsonUi: try to handle all available requests, on input event, not just the first one
2016-08-24 23:47:09 +01:00
Maxime Coste
3f0415c765
Introduce the 'completion_extra_word_chars' option
...
This string option is used to get all the additional characters
that should be considered as "word" character for the purpose of
insert mode completion.
Fixes #758
2016-08-24 23:47:09 +01:00
Maxime Coste
911a32a992
Only drop blank prefixed history entries in command/shell prompts
...
For regex prompts we actually want to save them, as a leading space
is significant
Fixes #767
2016-08-22 20:37:14 +01:00
Maxime Coste
ac81d0f39c
Cleanup history_push function
2016-08-22 20:37:14 +01:00
Maxime Coste
56a7c6e594
Rework buggy number selection function
...
Fixes #765
Fixes #766
2016-08-22 13:54:22 +01:00
Maxime Coste
0de4fc75d0
Dont consider OptionManager watcher list as part of the state of the option manager
2016-08-21 20:24:18 +01:00
Maxime Coste
1d1f27248f
Try to fix travis ci
2016-08-18 22:42:31 +01:00
Maxime Coste
8803bf7c46
Fix comment missing a closing parenthesis
2016-08-14 20:05:57 +01:00
Maxime Coste
bedf2f703c
Small code cleanups
2016-08-09 21:45:06 +01:00
Maxime Coste
ac0c746072
Tweak format of option docstrings
2016-08-07 10:47:26 +01:00
Maxime Coste
f73e89a716
Add information of types of options
2016-08-06 09:05:50 +01:00
Maxime Coste
f1a93a0e61
Replace some const String& with StringView in option_manager.hh
2016-08-06 06:52:11 +01:00
Maxime Coste
5b7b6eebaf
Regenerate shell-candidates for each completion sessions
...
That should allow fixing the #665 issue while still avoiding to
run a potentially long shell command on each keystroke.
2016-08-05 13:53:19 +01:00
Maxime Coste
38d372567b
Do not force exec to run in normal mode anymore, run in the current mode
2016-08-05 09:43:33 +01:00
Maxime Coste
373c21e875
Preserve selections when converting to client mode
...
Fixes #742
2016-08-05 08:16:43 +01:00
Maxime Coste
8cc27354e8
Support sorting and merging overlapping separately, fix bug in move
...
Fixes #754
2016-07-30 15:32:47 +01:00
Maxime Coste
d28e503150
Use the same logic for mouse wheel and (half) page up/down
...
Fixes #749
2016-07-28 09:51:49 +01:00
Maxime Coste
a7005ec74b
Add a char_length(Buffer&, const ByteCoord&, const ByteCoord&) util
2016-07-28 09:41:47 +01:00
Maxime Coste
74c3f101cd
Use -1 for invalid codepoint, not 0
2016-07-28 09:24:51 +01:00
Maxime Coste
2425f4a781
Tweak session renaming code
2016-07-28 00:16:41 +01:00
Maxime Coste
62fa133efd
Merge remote-tracking branch 'doppioandante/set_session'
2016-07-28 00:12:09 +01:00
Maxime Coste
623fcd88ea
Do not avoid end of lines after selecting modified ranges in undo
...
Fixes #751
2016-07-27 23:53:16 +01:00
Maxime Coste
14198fadb4
BufferIterator is random access, not just bidirectional
2016-07-27 21:36:52 +01:00
Maxime Coste
14f59d415d
Avoid underlying iterator copies in utf8_iterator
2016-07-27 21:36:32 +01:00
Maxime Coste
df0773feeb
Ensure we cannot call StringView::StringView{Codepoint}
2016-07-27 09:08:08 +01:00
Maxime Coste
a09b094f2b
Avoid repeated calls to context.selections() in highlight_selections
2016-07-27 09:03:01 +01:00
Maxime Coste
0d2c5072b0
Merge remote-tracking branch 'lenormf/fix-timespec-conversion'
2016-07-27 00:37:04 +01:00
Maxime Coste
09188a2bc1
Revert "Try to disambiguate timespec as a struct"
...
This reverts commit 17d2dc9477
.
2016-07-27 00:36:53 +01:00
Maxime Coste
17d2dc9477
Try to disambiguate timespec as a struct
2016-07-27 00:34:20 +01:00
Maxime Coste
f30bd4c540
Fix use of dead string memory and quick cleanup
2016-07-27 00:25:05 +01:00
Maxime Coste
35f1ad100e
Merge remote-tracking branch 'lenormf/select-arbitrary-punctuation'
2016-07-27 00:14:49 +01:00
Maxime Coste
dffb1dff7c
Add missing <time.h> header so that timespec is well defined
2016-07-27 00:14:11 +01:00
Maxime Coste
80c3405a20
Rework SelectionList::check_invariant
2016-07-27 00:04:06 +01:00
Maxime Coste
13ed87410f
Rework compute_modified_ranges
...
Fixes #743
2016-07-26 23:31:23 +01:00
Frank LENORMAND
f04a7a0ed3
Allow selection primitives to use arbitrary punctuation signs
2016-07-26 10:39:18 +03:00
Frank LENORMAND
f8224b1384
Use explicit initialization of the timespec
object to fix compilation on older compilers
2016-07-26 09:43:41 +03:00
Maxime Coste
78fc88ae6d
Display some information when moving in history
2016-07-24 22:55:37 +01:00
Enrico Lumetti
1a7cd707aa
Add 'session' command to change remote session name
2016-07-24 22:46:33 +02:00
Maxime Coste
087a17eb24
Support for going backward/forward in buffer history with <a-u>/<a-U>
2016-07-24 21:25:05 +01:00
Maxime Coste
03a4b3c73f
Support counts for undo/redo
2016-07-24 21:25:05 +01:00
Maxime Coste
3edd2c127c
Support moving between arbitrary history nodes
2016-07-24 21:25:05 +01:00
Maxime Coste
b9c77e2f09
Store creation timepoint in HistoryNode
2016-07-24 21:25:05 +01:00
Maxime Coste
46a15534c5
Introduce chrono.hh
2016-07-24 21:25:05 +01:00
Maxime Coste
e391f93a9e
Set memory domains for Buffer::HistoryNode
2016-07-24 21:25:05 +01:00
Maxime Coste
2296b43299
Store buffer undo/redo information in a tree instead of a vector
2016-07-24 21:25:05 +01:00
Maxime Coste
003cb8dfea
Merge remote-tracking branch 'lenormf/readonly-mode'
2016-07-24 21:21:49 +01:00
Frank LENORMAND
e3bf01d1f9
Replace C-style operators with their alphabetical equivalent
2016-07-24 08:34:49 +03:00
Frank LENORMAND
ef82c496eb
Use a more appropriate error message with unlogical flag combinations
2016-07-23 10:03:25 +03:00
Frank LENORMAND
3c91f711fc
Warn the user when flag combinations don't make sense
2016-07-23 10:03:25 +03:00
Frank LENORMAND
8a4596bea9
Implement a readonly
mode
...
This commit introduces the `readonly` variable as well as the `-ro`
command line option which prevent buffers from being overwritten on
disk when the `write` command is used without arguments. Some buffers
can selectively be put in readonly mode by setting the `readonly`
variable on the `buffer` scope, the `global` mode will affect all
buffers (even those who will be open subsequently), using the `window`
scope will have no effect.
Closes #685
2016-07-23 10:03:21 +03:00
Maxime Coste
3ddc6eccda
Add sanity check
2016-07-15 20:26:58 +01:00
Maxime Coste
1401c55531
Faster implementation of utf8::advance not copying iterators at each step
2016-07-15 20:26:33 +01:00
Maxime Coste
73fdc726fb
Avoid postfix increment in utf8::distance
2016-07-15 20:07:47 +01:00
Maxime Coste
4ecdbea5c4
Make buffer iterator iteration/dereference faster
2016-07-15 19:48:13 +01:00
Maxime Coste
b988871df6
Ensure selections are sorted and non overlapping in selections_list_from_string
2016-07-14 21:14:17 +01:00
Maxime Coste
52d3b60aaa
Clamp selection generated in selection_list_from_string
...
Fixes #733
2016-07-13 19:25:32 +01:00
Maxime Coste
bb688cf42d
Do not throw when recursive hook calls are detected
...
Running hooks is non critical, and should never `fail` as far as
caller is concerned.
2016-07-11 19:44:29 +01:00
Maxime Coste
530ecf212e
Ensure buffer create/close hooks are run at appropriate times
...
They used to be ran before the buffer was added to the buffer list
we now run them afterwards.
2016-07-10 16:34:16 +01:00
Maxime Coste
88a9607552
Keep modified selections in non-draft exec/eval -itersel
...
Fixes #727
2016-07-08 09:52:10 +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
8270f9299f
Improve robustness of json parsing and execution
...
Fixes #720
2016-07-04 19:31:09 +01:00
Maxime Coste
469eb6ec44
Avoid possible access to an invalid, being deleted buffer list.
2016-07-04 19:20:22 +01:00
Maxime Coste
ca7f647562
Refactor Optional::operator==
2016-07-04 19:19:40 +01:00
Maxime Coste
e262dc1257
Support Resize modifiers in key_to_str
...
As seen in #715 , that was not supported correctly
2016-06-30 23:49:21 +01:00
Maxime Coste
c8f5204202
Try to make the json ui more tolerant with the json input
...
Should improve the issues raised #714
2016-06-29 21:08:16 +01:00
Maxime Coste
511367f977
Change end of line format detection logic to match vims
...
Only consider a buffer to be Crlf if *all* of its lines use it, else
consider it as Lf with embedded Cr chars.
Fixes #686
2016-06-28 20:46:20 +01:00
Frank LENORMAND
eca7850203
Fix a warning about the forward declaration of SelectionList
2016-06-27 20:59:46 +01:00
Maxime Coste
e07ff0c669
Use tparm instead of tiparm as built in OSX ncurses does not support it
2016-06-27 20:59:02 +01:00
Maxime Coste
089eaa52e0
Detect recursive hook run and abort in that case
...
Fixes #709
2016-06-27 20:55:07 +01:00
Maxime Coste
fcf73c2293
Refactor context_wrap to share more code between draft/non draft case
...
Fixes #706
2016-06-22 22:27:43 +01:00
Maxime Coste
a8cf2a84c4
Add an Optional::emplace method
2016-06-22 22:17:13 +01:00
Maxime Coste
5cb9cf4cc3
Go back to saving built-in registers by default in non draft :exec/:eval
2016-06-22 19:57:21 +01:00
Maxime Coste
532ae5a1a6
Do not go backward to when selecting to end of line from the end of line
...
Fixes #699
2016-06-22 19:56:40 +01:00
Maxime Coste
c032306e04
Merge remote-tracking branch 'doppioandante/fix-json'
2016-06-21 23:51:15 +01:00
Maxime Coste
b77eff1b72
Fix parameter order in fputs
2016-06-21 00:47:46 +01:00
Maxime Coste
2edea2e0f6
Use fputs and fflush in ncurses_ui direct stdout access to respect buffering
...
Ncurses will write using the FILE* interface, using the fd based one is error
prone.
Fixes #703
2016-06-20 23:43:21 +01:00
Maxime Coste
91bf0d4622
Make window scope available to draft contexts
...
We do want window options/aliases/keymaps/hooks to be available in
draft context, dont we ?
Fixes #702
2016-06-20 19:45:15 +01:00
Maxime Coste
fef37e6a92
Do not preserve registers by default when exec/eval in a non draft context
...
Fixes #700
2016-06-20 19:40:49 +01:00
Enrico Lumetti
97680827b8
Fix JSON integer parsing
2016-06-20 16:59:32 +02:00
Maxime Coste
471c75d738
Trim trailing end of lines in %sh outputs
...
Fixes #698
2016-06-19 17:01:56 +01:00
Maxime Coste
b8908f2dc6
Add a String::resize method
2016-06-19 17:01:27 +01:00
Maxime Coste
f2ba54b2d4
Keep prompt displayed on <c-r> and <c-v> in prompt mode
2016-06-18 11:07:18 +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
04d24b22bd
Fix parsing of empty json objects/arrays and recover parse errors
...
Fixes #694
2016-06-11 13:42:25 +01:00
Maxime Coste
3059b3a253
Extract ui type parsing to its own function
2016-06-11 13:22:24 +01:00
Maxime Coste
c73e64882c
Check session valididty on kak -l and support kak -clear for clearing the dead ones
...
Fixes #689
2016-06-06 19:28:56 +01:00
Maxime Coste
e2bfd9e3b2
Diagnose empty selection desc string
...
Fixes #690
2016-06-06 17:17:18 +01:00
Maxime Coste
5cab2078f8
Fix string view created from a temporary string
...
This is clearly a case where rust style lifetime analysis would
have been nice, hopefully it comes with GSL lifetime extensions...
Fixes #680
2016-05-24 22:36:20 +01:00
Maxime Coste
fa35330b42
Fix RankedMatch ordering where 'a < a' was true
...
Fixes #679
2016-05-20 18:42:01 +01:00
Maxime Coste
7280525672
Dont overwrite registers with empty macros
...
Fixes #674
2016-05-20 09:44:05 +01:00
Maxime Coste
6181781f3d
Change dir to $HOME when no parameters are given to cd
...
Fixes #678
2016-05-20 09:41:29 +01:00
Maxime Coste
365887539b
Reject '//' as a file completion prefix to avoid cygwin network hosts listing
2016-05-19 21:46:27 +01:00
Maxime Coste
1834a67b87
Go back to libc locale and use c_regex_traits
...
Unfortunately, cygwin does not support c++ locales.
2016-05-19 21:45:23 +01:00
Maxime Coste
e1703204f8
fix bug in utf8_iterator
2016-05-19 20:20:42 +01:00
Maxime Coste
fb01c8c377
Do not force recreate scratch buffers by default, require edit! for that
2016-05-17 19:41:24 +01:00
Maxime Coste
49e674fe55
Fix RankedMatch::operator< with matching prefix candidates
2016-05-17 19:40:36 +01:00