Commit Graph

107 Commits

Author SHA1 Message Date
Maxime Coste
e4fd839dda use a strongly typed int CharCount for character counts 2012-08-23 23:56:35 +02:00
Maxime Coste
0d8cce2728 use a strongly typed int LineCount for line counts 2012-08-22 23:33:52 +02:00
Maxime Coste
c9a7cf50f3 add Window::center_selection method 2012-08-21 20:05:56 +02:00
Maxime Coste
9fcb89c8fc Window: tolerate invisible cursor when it is the end of the buffer 2012-08-02 07:04:42 +02:00
Maxime Coste
1d5180e782 Window: handle horizontal scrolling correctly
Window::scroll_to_keep_cursor_visible_ifn now highlights the cursor
line in order to find its real display position (for example if the
number_lines highlighter is present it may modify the position).
2012-07-15 01:48:50 +02:00
Maxime Coste
03d8efc249 DisplayBuffer: add range and compute_range methods 2012-07-12 23:51:13 +02:00
Maxime Coste
b1a087485c DisplayBuffer rewrite, a DisplayBuffer is now a list of DisplayLines
Code is now greatly simplified using this architecture, and
DisplayAtoms no longer know their DisplayCoords and can be in any
order.
2012-07-12 23:19:10 +02:00
Maxime Coste
71fcc123bc Window: remove iterator_at and line_and_column_at methods 2012-07-12 14:28:58 +02:00
Maxime Coste
5cbded8221 make display buffers and highlighters handle better longer than display lines
still work in progress, I think the whole display system will in fact need
a rewrite.
2012-07-03 23:23:07 +02:00
Maxime Coste
f7ee2801e9 Windows call the WinSetOption hook when an option changes 2012-06-14 13:19:38 +00: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
9bcfda3226 HookManager are now hierarchical from window to buffer to global
window hooks also executes buffer hook which also execute global hooks
2012-06-07 13:29:44 +00:00
Maxime Coste
6fa40796e7 Fix Window::scroll_to_keep_cursor_visible_ifn 2012-05-29 00:14:05 +00:00
Maxime Coste
9337938403 replace std::string references with String 2012-04-14 01:17:09 +00:00
Maxime Coste
f3dd65fbf1 add an OptionManager class and use it to manage tabstops
OptionManager map names to options, and may delegate option resolution
to it's parent if it does not contains the asked for option. That way
Buffers can override global options, and Windows can override Buffer
options.
2012-04-03 13:39:20 +00:00
Maxime Coste
9444c84b1c rename HooksManager to HookManager 2012-04-03 12:01:01 +00:00
Maxime Coste
f43d206e4e remove unused measure_string from window.cc 2012-03-26 23:13:09 +00:00
Maxime Coste
3c798a4ee8 remove useless Window::cursor_{position,iterator} 2012-03-21 19:26:42 +00:00
Maxime Coste
df0f7b4689 rename BufferString to String 2012-03-08 21:23:29 +00:00
Maxime Coste
c99a6a3e4c fix last line handling in window display buffer 2012-03-06 14:27:49 +00:00
Maxime Coste
04a37d8895 Editor refactoring, merge undo and batch management 2012-02-07 23:41:10 +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
69d96c90da extract an Editor class from Window and refactor 2012-01-31 19:12:06 +00:00
Maxime Coste
a72d185f79 remove DynamicBufferIterator and make Selection a ModificationListener
DynamicBufferIterator is only used by Selections. And each selection
had two iterators, resulting in two ModificationListeners registered
in the buffer instead of one now.
2012-01-25 19:32:06 +00:00
Maxime Coste
382d5a334c do not use a DynamicBufferIterator in IncrementalInserter::IncrementalInserter 2012-01-25 18:59:11 +00:00
Maxime Coste
d1c29d2b78 moving no longer clears multiple selections 2012-01-25 14:23:02 +00:00
Maxime Coste
e0b216d576 HooksManager: do not propagate hooks runtime exception 2012-01-24 23:17:26 +00:00
Maxime Coste
c38f244c06 Window have it's own hooks manager 2012-01-23 13:57:24 +00:00
Maxime Coste
945ad361fb HooksManager: forward declare Context instead of including context.hh 2012-01-23 13:56:43 +00:00
Maxime Coste
db9040e29e HooksManager: extract the Singleton version as GlobalHooksManager 2012-01-23 13:40:42 +00:00
Maxime Coste
2824bd9a46 HighlighterGroup: move to it's own file, Window uses them directly 2012-01-19 20:37:29 +00:00
Maxime Coste
541872cafa completion support for addgrouphl and rmgrouphl 2012-01-18 11:33:58 +00:00
Maxime Coste
2cfa70a466 Window: add get_highlighter_group method 2012-01-15 13:46:12 +00:00
Maxime Coste
9557167f26 <space> with a count argument replaces current selections with the counth selection. 2012-01-09 14:28:01 +00:00
Maxime Coste
67c08e598b IncrementalInserter: preserve selection through hook call 2011-12-21 19:06:51 +00:00
Maxime Coste
f77fc3980b Window: store a stack of selections 2011-12-21 19:06:26 +00:00
Maxime Coste
70bb4847ee IncrementalInserter: catch exception thrown by the hook 2011-12-21 18:57:07 +00:00
Maxime Coste
6c817c8117 Window: do not manage undo groups when an inserter is active 2011-12-21 18:56:32 +00:00
Maxime Coste
ba1fe056f4 Add an exec command, similar to vim normal command 2011-12-20 19:22:05 +00:00
Maxime Coste
7116ed6d61 Window: throw when multiselect results in no selections 2011-12-20 19:27:13 +00:00
Maxime Coste
e77f58c010 better rvalue reference forwarding 2011-12-07 18:57:07 +00:00
Maxime Coste
2239fb6e49 Filters: move from buffer to window 2011-12-07 14:29:10 +00:00
Maxime Coste
c40eb2b03a Buffer: replace insert and erase methods with modify
modify directly takes a Modification as parameter
2011-12-07 14:26:40 +00:00
Maxime Coste
b245d80c4e Window: preserve current selection when empty multi_select 2011-12-05 19:21:16 +00:00
Maxime Coste
711c05b81e Window: fix trailing spaces 2011-12-05 14:29:36 +00:00
Maxime Coste
4252e0d610 Window: use an idvaluemap to store highlighters 2011-12-02 14:20:11 +00:00
Maxime Coste
0b48525b35 Window: do not stay on an eol when clearing selections 2011-11-29 22:48:00 +00:00
Maxime Coste
0859b20bcf Rename Filter to Highlighter to be more explicit 2011-11-29 22:37:20 +00:00
Maxime Coste
e89516f2a3 IncrementalInserter: refactoring 2011-11-29 21:35:50 +00:00
Maxime Coste
dd2896ecc8 Window: call WinCreate hook on creation 2011-11-26 18:39:59 +00:00