Commit Graph

50 Commits

Author SHA1 Message Date
Maxime Coste
894ee0297e Move main selection index to SelectionList 2013-12-14 14:38:17 +00:00
Maxime Coste
471aeaab9a remove filters, use hooks instead 2013-11-04 22:02:44 +00:00
Maxime Coste
3e12507636 Remove IncrementalInserter and move it's code to InputModes::Insert 2013-11-04 22:02:43 +00:00
Maxime Coste
eedd37c09a memoryview: always pass by value 2013-07-26 01:50:36 +02:00
Maxime Coste
3862b5cbb8 LineAndColumns: always pass by value 2013-07-26 01:50:09 +02:00
Maxime Coste
486ebed098 try to preserve display column rather than buffer column when moving line 2013-07-23 20:46:15 +02:00
Maxime Coste
1388c0d540 Editor: clamp coordinates in select(BufferCoord) 2013-07-12 13:15:31 +01:00
Maxime Coste
76f55f5256 remove useless iterator_at calls 2013-06-04 14:21:07 +02:00
Maxime Coste
b51799a2b2 Explicitly pass buffer to selectors 2013-06-01 14:22:57 +02:00
Maxime Coste
52b77c1915 window, editor: take coords rather than iterators parameters 2013-05-30 13:59:38 +02:00
Maxime Coste
1fd99e7e88 do not check buffer invariant in do_{erase,insert} as this cause O(n²) behaviour 2013-04-04 14:04:37 +02:00
Maxime Coste
a3bc8dbc79 idvaluemap: minor style changes 2013-03-27 18:42:00 +01:00
Maxime Coste
251f09ff89 Merge {Filter,Highlighter}Group in a FunctionGroup template 2013-03-27 13:45:22 +01:00
Maxime Coste
354ae7ad89 Editor: keep selections sorted and use an index for the main one 2013-03-18 19:09:07 +01:00
Maxime Coste
a981d41cde Editor: replace selections().back() with main_selection() 2013-03-15 18:22:08 +01:00
Maxime Coste
67971995f8 Fix class/struct mismatches 2013-02-18 14:00:43 +01:00
Maxime Coste
c45838cc57 Move Insertion Hooks handing to the input handler 2013-01-17 13:58:57 +01:00
Maxime Coste
02b9fcc3df Editor: add a ReplaceLast select mode 2013-01-03 14:00:31 +01:00
Maxime Coste
76c3246642 Add Editor::select(const Selection&, SelectMode) 2012-12-31 14:06:20 +01:00
Maxime Coste
6cc4ec796e editor: support select mode on select(BufferIterator) 2012-12-18 19:12:15 +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
cee0a2d128 Append on end of line now appends to current line 2012-11-26 19:23:50 +01:00
Maxime Coste
4dc333c8b3 minor cleanups 2012-11-20 14:14:32 +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
42315c4b5c Editor: store a safe_ptr to buffer instead of reference 2012-11-04 23:39:25 +01:00
Maxime Coste
d574ae864d Editor::insert takes an InsertMode param, remove Editor::{append,replace} 2012-10-09 19:25:20 +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
bd0805cf3e autoenable word completion while inserting 2012-10-01 14:23:04 +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
Maxime Coste
730f39aaa0 remove selection stack from editor 2012-09-24 20:47:06 +02:00
Maxime Coste
287628ec19 Editor::{select,move_cursor} takes a enum SelectMode parameter instead of a boolean 2012-09-07 14:29:29 +02:00
Maxime Coste
759319ca44 Buffer: move back Modification as an implementation detail
* Filters now only works on insertion and take directly the
   iterator and content
 * use Buffer::insert and Buffer::erase to modify a buffer
2012-08-10 19:12:43 +02:00
Maxime Coste
2cc01d3407 move SafeCountable functionality to Editor from Window 2012-08-05 18:23:09 +02:00
Maxime Coste
fe988868e5 IncrementalInserter preserves selections 2012-07-16 21:21:56 +02:00
Maxime Coste
06dd3f8aad Add Editor::replace(memoryview) and bind alt-P to replace paste 2012-07-11 14:15:27 +02:00
Maxime Coste
5b2ef1da6a IncrementalInsertor::insert takes a memoryview<String> rather than a Register 2012-06-29 18:35:48 +02:00
Maxime Coste
c0987ebacc Add a FilterGroup, and cleanup HighlighterGroup
FilterGroup is similar to HighlighterGroup, it permits grouping
together filters for easy removal.
2012-06-12 18:24:29 +00:00
Maxime Coste
2c4bc5582a Alt-Space permits to remove a selection by index 2012-05-29 11:15:43 +00:00
Maxime Coste
9337938403 replace std::string references with String 2012-04-14 01:17:09 +00:00
Maxime Coste
df0f7b4689 rename BufferString to String 2012-03-08 21:23:29 +00:00
Maxime Coste
d84d085cc2 Merge captures into registers, implements register insertion 2012-02-09 23:47:55 +00:00
Maxime Coste
04a37d8895 Editor refactoring, merge undo and batch management 2012-02-07 23:41:10 +00:00
Maxime Coste
9b5e9ffee2 selectors now take a Selection as parameter instead of a BufferIterator 2012-02-07 14:26:51 +00:00
Maxime Coste
96b167859a batches support in Editor, used by IncrementalInserter and exec_string
Editor groups all modification together in one undo group when batching.
nested batches are supported.
2012-02-03 13:55:22 +00:00
Maxime Coste
96101b4392 Use an Editor instead of a Window as much as possible 2012-02-02 20:48:03 +00:00
Maxime Coste
69d96c90da extract an Editor class from Window and refactor 2012-01-31 19:12:06 +00:00