Commit Graph

111 Commits

Author SHA1 Message Date
Maxime Coste
3c8df764be fix insert mode erase utf-8 handling, add unit test 2013-07-30 19:18:01 +01: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
2a74b0e9e2 Buffer: insert and erase go back to taking iterators, and return iterators 2013-06-06 19:44:08 +02:00
Maxime Coste
3d8eecbbb6 minor cleanups Editor 2013-06-06 19:44:08 +02:00
Maxime Coste
12d3b64a1b avoid_eol: use direct line access 2013-06-06 19:44:07 +02:00
Maxime Coste
70bf71e51f remove Buffer:char_{distance,advance} use line access instead 2013-06-06 19:44:07 +02:00
Maxime Coste
580749a91d Buffer: remove line_length and replace line_content with operator[] 2013-06-06 19:44:07 +02:00
Maxime Coste
6b667bc803 remove BufferIterator conversion to/from BufferCoord 2013-06-06 19:44:07 +02:00
Maxime Coste
cf1f26ac91 fix Editor::move_selections(LineCount...) on buffer bounds 2013-06-04 18:53:13 +02:00
Maxime Coste
503f0cce25 IncrementalInserter: use coords instead of iterators 2013-06-04 14:21:07 +02:00
Maxime Coste
4ef1bfa4db Use coord instead of iterators for selections 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
3453ebbd52 BufferChangeListener: pass buffer to on_{inser,erase} 2013-06-01 00:48:46 +02:00
Maxime Coste
7f8d5c1fd0 Remove Range::content 2013-05-30 13:59:38 +02:00
Maxime Coste
93dd1ff3c7 Remove begin/end from Ranges, replace with min/max
Ranges should not be utf8 aware (needed for end), and a lot of
uses for end() were in fact looking for max.
2013-05-30 13:59:38 +02:00
Maxime Coste
7f17644a6b Buffer insert and erase takes coord rather than iterators 2013-05-30 13:59:38 +02:00
Maxime Coste
6c290eff9a Buffer::do_{erase,insert} takes coord parameters rather than iterators
BufferChangeListeners do as well use coord rather than iterators
2013-05-29 18:58:20 +02:00
Maxime Coste
9630990b74 Remove Selection::avoid_eol, move as static func in editor.cc
Conflicts:
	src/editor.cc
2013-05-29 18:53:57 +02:00
Maxime Coste
1fb971e389 Editor::select(Selection, SelectMode::Extend) now only keeps the extended main selection 2013-05-14 13:58:41 +02:00
Maxime Coste
33740d06ee Editor: tweak behaviour on undo/redo when selecting modified ranges 2013-05-03 18:44:26 +02:00
Maxime Coste
564cfb084e Editor: undo and redo select all ranges modified instead of the last one 2013-05-03 18:44:26 +02:00
Maxime Coste
270e950cf1 sort includes directives 2013-04-09 20:05:40 +02:00
Maxime Coste
5adee4a6a7 rename assert to kak_assert to avoid collisions 2013-04-09 20:04:11 +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
5bb8e656c5 Editor: fix utf8 handling in prepare_insert 2013-04-03 18:52:49 +02:00
Maxime Coste
d99fe87b43 Editor: fix select(Selection&, SelectMode::Replace) 2013-03-20 19:11:58 +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
0f957b3743 Editor: fix replace at end of buffer 2013-03-13 14:37:03 +01:00
Maxime Coste
298926a16e Editor::multi_select: reserve some vector space in advance 2013-02-28 18:51:58 +01:00
Maxime Coste
4ad8941563 Editor: fix move_selection(LineCount) when current column is after next line end 2013-02-27 21:09:48 +01:00
Maxime Coste
2f410f62e4 Add String Range::content() const 2013-02-27 19:11:25 +01:00
Maxime Coste
cd8c36fc50 Add a debug option to Makefile, and use KAK_DEBUG define to remove debug code 2013-02-27 19:02:01 +01:00
Maxime Coste
0f413607c2 Fix utf8 handling when moving selection up/down 2013-02-26 18:52:49 +01:00
Maxime Coste
c343407465 Fix utf8 handling in Editor::insert when replacing 2013-02-26 14:06:25 +01:00
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