Commit Graph

118 Commits

Author SHA1 Message Date
Maxime Coste
2c09da50be Add key mapping support 2013-10-25 00:30:46 +01:00
Maxime Coste
60dbec4949 Add Buffer::reload for reloading buffers without loosing options and hooks 2013-10-21 18:57:19 +01:00
Maxime Coste
44281c8fed More robust Buffer filesystem timestamp handling 2013-10-17 18:47:09 +01:00
Maxime Coste
03c74b7a88 Detect file external modification and ask the user whether to reload or not
* Buffer now store a m_fs_timestamp field.
* Client in Normal mode checks current buffer file every 500 ms, or
  each time it goes back to Normal mode.
2013-10-15 18:51:31 +01:00
Maxime Coste
a2577b4180 buffer: move Buffer::Flags operator as friends defined inside Buffer 2013-08-01 00:28:01 +02:00
Maxime Coste
3862b5cbb8 LineAndColumns: always pass by value 2013-07-26 01:50:09 +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
bd504058d9 remove unused Buffer::char_at 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
777158e86d remove BufferIterator::is_valid() 2013-06-04 18:56:28 +02:00
Maxime Coste
a23aa10797 remove BufferIterator::buffer() 2013-06-04 18:55:06 +02:00
Maxime Coste
9fb4d42408 remove BufferIterator::is_{begin,end} 2013-06-04 18:53:56 +02:00
Maxime Coste
51acd456cc remove BufferIterator::{line,column}() 2013-06-04 18:53:28 +02:00
Maxime Coste
c4f9253634 Remove Buffer::iterator_at_line_{begin,end}, use iterator_at(line{,+1}) 2013-06-04 14:21:07 +02:00
Maxime Coste
02b33c7d8f Buffer: add methods for char access instead of byte access 2013-06-03 18:56:48 +02:00
Maxime Coste
3453ebbd52 BufferChangeListener: pass buffer to on_{inser,erase} 2013-06-01 00:48:46 +02:00
Maxime Coste
28e127a48a remove avoid_eol parameter from Buffer::{iterator_at,clamp} 2013-05-30 14:23:25 +02:00
Maxime Coste
07c8379313 BufferIterator are Random Access iterators 2013-05-30 14:05:05 +02:00
Maxime Coste
d2df6a9f15 remove BufferIterator::clamp 2013-05-30 14:00:41 +02:00
Maxime Coste
ae947b456d remove BufferIterator::offset 2013-05-30 13:59:38 +02:00
Maxime Coste
a07fde181a Add Buffer::{next,prev,at}(BufferCoord) methods and use them in iterators 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
2902cc3275 BufferIterator convert implicitly to const BufferCoord& 2013-05-30 13:59:38 +02:00
Maxime Coste
d5b190369a DisplayBuffer: use coords 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
f23f48172f Buffer: add some method to work directly with coord instead of iterators 2013-05-29 18:58:20 +02:00
Maxime Coste
7ce3212fb2 When committing an undo group, run an optimization pass on it
With incremntal insertion, undo groups tends to be a lot of single
character insertion/deletions at the same point, but the end
result is most of the time a single string insertion. Buffer
now tries to optimize the undo group.
2013-04-26 18:48:31 +02:00
Maxime Coste
f8c3b6c9ef Buffer: rename character_count method to byte_count 2013-04-24 13:56:36 +02:00
Maxime Coste
72ef210e1b Buffer: add is_valid(BufferCoord) method 2013-04-23 18:46:18 +02:00
Maxime Coste
681f30dd28 support renaming buffers
Changing buffer name allows to save a *make* or *grep* buffer when
launching another one for exemple.
2013-04-22 13:49:07 +02:00
Maxime Coste
270e950cf1 sort includes directives 2013-04-09 20:05:40 +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
a18241a03b Extract AutoRegister logic to a helper class 2013-04-02 13:56:30 +02:00
Maxime Coste
22c34b79f6 Move change listener registration to BufferChangeListener_AutoRegister
DynamicSelectionList now just inherit from this class, so that
the registration logic can be shared.
2013-03-31 14:53:32 +02:00
Maxime Coste
9429b662ca move absolute path logic to Buffer class 2013-03-25 19:58:23 +01:00
Maxime Coste
5e88b7fe28 move BufferIterator on_{insert,erase} as DynamicSelectionList implementation detail 2013-03-15 14:22:42 +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
edef8e4e98 Remove Set and use unordered_set 2013-01-31 18:58:25 +01:00
Maxime Coste
f14bc5e310 Buffer: small style fixes 2013-01-23 13:47:45 +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
c32a7b9b74 Buffer takes a vector of lines as initial content 2012-11-23 18:42:07 +01:00
Maxime Coste
11e885e5a5 Cleanups and minor refactoring on Buffer 2012-11-22 18:54:37 +01:00
Maxime Coste
08ad8e8a40 move Window ownership to the ClientManager instead of the Buffer 2012-11-22 14:08:55 +01:00
Maxime Coste
3b5530ac09 rename (hook|option)_manager to (hook|option)s.
And Global(Hook|Option)Manager to Global(Hook|Option)s
2012-11-22 13:50:29 +01:00
Maxime Coste
d1fade5c9e Buffer: replace reset_undo_data with a NoUndo flag 2012-11-21 13:43:10 +01:00
Maxime Coste
8bbfbc8c72 Buffer: replace Buffer::Type with Buffer::Flags 2012-11-20 19:47:56 +01:00
Maxime Coste
77272db0fd make Buffer::{add,remove}_change_listener const and the listener list mutable 2012-11-12 20:11:27 +01:00
Maxime Coste
6ebe41b1a5 BufferIterator holds a safe_ptr to their buffer instead of a raw pointer 2012-11-12 20:07:33 +01:00