Commit Graph

3208 Commits

Author SHA1 Message Date
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