Commit Graph

26 Commits

Author SHA1 Message Date
Maxime Coste
dc74934e59 DisplayBuffer: refactoring, correct support of replacements
DisplayAtoms now know where they are on the screen and have
line_and_column_at and iterator_at methods.
2011-10-15 04:45:49 +00:00
Maxime Coste
26459abf8a WindowCoord: rename to DisplayCoord and move with DisplayBuffer 2011-10-14 14:29:53 +00:00
Maxime Coste
2d54a7818e Window: privatize coordinates conversion methods 2011-10-12 18:54:48 +00:00
Maxime Coste
be043ffe1e Window: move_cursor_to takes a BufferIterator parameter 2011-10-12 18:53:38 +00:00
Maxime Coste
12535e1099 Window: get rid of select_mode 2011-10-07 14:03:25 +00:00
Maxime Coste
571e4772b4 IncrementalInserter: support OpenLineBelow and OpenLineAbove mode 2011-10-06 21:12:55 +00:00
Maxime Coste
ff730380ed Window: empty_selections -> clear_selections
clear_selections also reset select_mode to Normal,
most editing operations now do a clear_selections.
2011-10-05 14:24:52 +00:00
Maxime Coste
c8cf7bbaa9 Window: add a basic status line 2011-10-04 18:49:41 +00:00
Maxime Coste
ba2800ddac Window: refactor DisplayBuffer generation 2011-09-28 20:54:11 +00:00
Maxime Coste
e619a81375 IncrementalInserter: Append, Insert or Change mode specified at construction 2011-09-28 19:14:39 +00:00
Maxime Coste
43fb64a913 Window: selection behaviour now depends on a window state
more vi-like behaviour, hit the v key to toggle append selection mode,
this means much more keys become available for mapping, as caps are now
longer reserved to append mode.
2011-09-28 14:23:43 +00:00
Maxime Coste
309b722df9 Window: cursors are now implicit, taken from current selections
Window hence guarantees that there is always at least one selection.
2011-09-27 18:45:22 +00:00
Maxime Coste
838ceb5958 Window: add selection_content method
it returns the content of the last selection, or the character under the
cursor if there are no selections.
2011-09-23 14:31:15 +00:00
Maxime Coste
662ba0c904 Selection: do not use [begin, end) semantics but [first, last]
selections are now defined with inclusive iterators, which means that
Selection(cursor, cursor) is a valid selection of the charateter pointed
by cursor.

On the user interface side, that means that the cursor is now part of
the selection, selectors were adapted to this behavior (and word
selectors are now much more intuitive)
2011-09-23 09:17:19 +00:00
Maxime Coste
5a46ad49ea Window: add move_cursor_to method 2011-09-22 14:00:04 +00:00
Maxime Coste
3012f69c4d Selection: fix canonicalize 2011-09-22 13:59:07 +00:00
Maxime Coste
9da8fbe630 Window: add a IncrementalInserter class for insert mode 2011-09-19 21:56:29 +00:00
Maxime Coste
85e2a31b31 Window: code cleanup and more intelligent Selection class 2011-09-17 14:57:35 +00:00
Maxime Coste
34c9b0d30f LineAndColumn: move to it's own header and add operator[+-]=?
LineAndColumn is now a template so that WindowCoords and BufferCoords
cannot be added together.
2011-09-17 14:13:33 +00:00
Maxime Coste
76b7c60afb Buffer is now responsible for window creation 2011-09-08 14:30:36 +00:00
Maxime Coste
d3499ecd9c Window lifetime is now handled by it's buffer.
A window cannot outlive it's buffer, so it makes sense to keep only a
reference on it hand have the buffer manage the window lifetime.
2011-09-08 00:13:19 +00:00
Maxime Coste
f88d1dbe06 Window: basic binding of bufffer undo feature 2011-09-06 18:52:52 +00:00
Maxime Coste
6668151c78 LineAndColumn: segregate into WindowCoord and BufferCoord
Having the same type to specify coordinates in window space or buffer
space is error prone, now the compiler will tell if we use one for
another.
2011-09-05 19:06:31 +00:00
Maxime Coste
d5012c9379 window: support scrolling 2011-09-05 18:55:31 +00:00
Maxime Coste
04c7ce8f01 window: cursor position is now stored in window coordinate
It was stored in buffer coordinates. Conversion methods added
2011-09-05 18:54:17 +00:00
Maxime Coste
535285d9e6 Initial commit 2011-09-02 16:51:20 +00:00