Maxime Coste
5f446d9aec
try to merge selections when begining incremental insertion
2013-02-21 18:44:17 +01:00
Maxime Coste
9f4498e035
Buffer: replace {begin,end}_undo_group with a single commit_undo_group method
2013-02-20 14:20:16 +01:00
Maxime Coste
2f9041b842
Editor: fix warning
2013-02-07 13:37:22 +01:00
Maxime Coste
edef8e4e98
Remove Set and use unordered_set
2013-01-31 18:58:25 +01:00
Maxime Coste
252f875926
fix sort_and_merge_overlapping
2013-01-29 19:05:40 +01:00
Maxime Coste
28cb78bed1
Editor: refactor InsertMode::Replace
2013-01-23 18:58:43 +01:00
Maxime Coste
3404366b65
add more asserts
2013-01-23 14:39:33 +01:00
Maxime Coste
44ca4d23de
Fix sort_and_merge_overlapping
2013-01-17 19:49:48 +01:00
Maxime Coste
c45838cc57
Move Insertion Hooks handing to the input handler
2013-01-17 13:58:57 +01:00
Maxime Coste
914ede7a82
Add and use a Set template class for recuring small sets
2013-01-11 14:28:13 +01:00
Maxime Coste
4b649d386c
various code style fixes
2013-01-04 18:39:13 +01:00
Maxime Coste
ae9aadb07d
Fix captures preservation in Editor
2013-01-03 18:47:02 +01:00
Maxime Coste
02b9fcc3df
Editor: add a ReplaceLast select mode
2013-01-03 14:00:31 +01:00
Maxime Coste
9fb0129061
Editor: keep last selection as last when sorting
...
sort selections 'circularly', keeping the last one
at the end of the list.
2013-01-03 13:59:53 +01:00
Maxime Coste
a9d5f126a0
Editor: preserve captures accross movements
2013-01-02 13:49:02 +01:00
Maxime Coste
476363bf0d
Editor: cleanup check_invariants calls
2012-12-31 18:36:28 +01:00
Maxime Coste
76c3246642
Add Editor::select(const Selection&, SelectMode)
2012-12-31 14:06:20 +01:00
Maxime Coste
18b35a3ab3
Editor: merge_overlapping -> sort_and_merge_overlapping
2012-12-31 13:56:52 +01:00
Maxime Coste
cb80ae139b
IncrementalInserter: fix append mode when on line end
2012-12-28 14:06:56 +01:00
Maxime Coste
030df1c4be
IncrementalInserter: preserve captures
2012-12-27 19:11:42 +01:00
Maxime Coste
41979c91f4
Editor: when replacing, select inserted text
2012-12-27 18:54:52 +01:00
Maxime Coste
6cc4ec796e
editor: support select mode on select(BufferIterator)
2012-12-18 19:12:15 +01:00
Maxime Coste
8e170e4385
optimize merge_overlappings
...
assume selections are sorted, so we have a linear complexity algorithm
instead of O(n²).
2012-12-13 18:50:27 +01:00
Maxime Coste
1c94064713
DynamicSelectionList: derive from SelectionList
...
the previous implementation did not preserve invariant
either, so we'd better use less code.
2012-12-13 18:50:27 +01:00
Maxime Coste
cfd7ee049a
move selection updating code out of selection, to DynamicSelectionList
...
this avoids a lot of unnecessary (add|remove)_change_listener as
creating temporary Selections do not call that anymore.
Use can choose between a SelectionList which or a DynamicSelectionList
depending on wethear the buffer will be modified or not during the
selections lifetime.
2012-12-13 18:50:27 +01:00
Maxime Coste
b764a0a63e
Selection: refactoring, move CaptureList to Selection
2012-11-30 18:32:49 +01:00
Maxime Coste
557128b641
IncrementalInsert::move_cursors: use overloaded for LineCount/CharCount editor implementation
2012-11-26 19:38:07 +01:00
Maxime Coste
cad4d3c01e
fix InsertMode::OpenLineBelow behaviour in prepare_insert
2012-11-26 19:24:38 +01:00
Maxime Coste
cee0a2d128
Append on end of line now appends to current line
2012-11-26 19:23:50 +01:00
Maxime Coste
e77ca7a4be
minor code simplification
2012-11-26 18:50:34 +01:00
Maxime Coste
84db1e2b8c
Editor: fix replacement beheviour just before end of line
2012-11-23 19:13:47 +01:00
Maxime Coste
11e885e5a5
Cleanups and minor refactoring on Buffer
2012-11-22 18:54:37 +01:00
Maxime Coste
3e53ebb5d6
alt-space without numeric parameter now flips selections, inverting first and last char
2012-11-19 19:03:56 +01:00
Maxime Coste
45bd3dbe5a
Pass the selection instead of only point of insertion to filters
2012-11-19 13:40:23 +01:00
Maxime Coste
14f980e4e0
move overlaps function to selection.hh
2012-11-12 20:27:56 +01:00
Maxime Coste
39932f7ea2
Fix IncrementalInserter::insert(memoryview<String>) so that inserting registers works as intended
2012-11-12 13:40:07 +01:00
Maxime Coste
3a34fae9a7
Editor: avoid end of lines when moving selection
2012-11-08 13:37:29 +01:00
Maxime Coste
42315c4b5c
Editor: store a safe_ptr to buffer instead of reference
2012-11-04 23:39:25 +01:00
Maxime Coste
dfafcdb6e6
utf8::codepoint: configurable invalid byte policy
2012-10-13 19:05:14 +02:00
Maxime Coste
0ce6bd9bf5
use ByteCount instead of CharCount when we are really counting bytes
...
(that is most of the time when we are not concerned with displaying)
2012-10-11 00:41:48 +02:00
Maxime Coste
a04d1e3a1f
Editor merge selections when they overlap
2012-10-10 19:11:24 +02:00
Maxime Coste
5bb37ad755
Support Append mode for Editor::select and use it for 'N' key
2012-10-10 13:59:55 +02:00
Maxime Coste
b48d639976
Editor::insert handle all InsertModes
2012-10-10 13:59:55 +02:00
Maxime Coste
d574ae864d
Editor::insert takes an InsertMode param, remove Editor::{append,replace}
2012-10-09 19:25:20 +02:00
Maxime Coste
ba50d853b3
Editor: fix move_selection(LineCount) for utf8
2012-10-09 14:29:59 +02:00
Maxime Coste
7e046e3f0b
utf8 awareness in editor, highlighters and ncurses
2012-10-08 14:27:43 +02:00
Maxime Coste
9ae8f5e47b
Editor::move_selection now either takes a LineCount or a CharCount
2012-10-02 14:10:00 +02:00
Maxime Coste
79d8d082bd
Store capture groups with selections in editor, and access them through dynamic registers
2012-09-26 20:43:42 +02:00
Maxime Coste
a8d2482eb6
Editor now stores selections as SelectionAndCapturesList
2012-09-26 20:33:47 +02:00
Maxime Coste
efc069b531
Extract IncrementalInserter::Mode as InsertMode
...
move ClientMode classes in a namespace due to InsertMode name collisions
2012-09-26 14:22:24 +02:00