Commit Graph

189 Commits

Author SHA1 Message Date
Maxime Coste
3c4400c5fd Change scrolloff behaviour, allow displaying pas the end of buffer
Fixes #306
2015-07-07 22:36:27 +01:00
Maxime Coste
1cbaac5323 Fix window position computation that could get negative with big scroll offsets 2015-07-06 13:10:36 +01:00
Maxime Coste
7e6b02f26a Refactor slightly window redrawing 2015-06-22 13:34:22 +01:00
Maxime Coste
3834440298 Rework window redraw handling, should redraw window less often 2015-06-21 19:56:23 +01:00
Maxime Coste
bf46870ff2 Move status/mode line drawing as a separate ui method 2015-06-17 21:28:02 +01:00
Maxime Coste
9668dccea9 Add support for Default face
The Default face is used to set default color values, if set
to default (the default), refers to terminal default colors.
2015-06-04 13:49:28 +01:00
Maxime Coste
045272ab8a Use a struct for BufferRange rather than std::pair 2015-04-23 21:38:45 +01:00
Maxime Coste
840e58e0b1 NCurses: When mode line is too long, trim it rather hiding it 2015-04-23 21:11:50 +01:00
Maxime Coste
e875828aa9 Use format for {Win,Buf}SetOption hooks description 2015-03-31 13:55:40 +01:00
Maxime Coste
7a7f86a205 Impreove Window::buffer_coord behaviour with invalid coords 2015-03-22 11:41:19 +00:00
Maxime Coste
3e28539b81 Add a display coord to buffer coord method to Window 2015-03-18 23:40:26 +00:00
Maxime Coste
99996902de Use a IdMap for storing hooks
The number of hook names is small (<20), using an UnorderedMap
is overkill, and prevents using StringView for key searching.
2015-03-05 14:59:27 +00:00
Maxime Coste
1c8ee78d1a Do not register timers for transient input handlers 2014-12-18 23:12:58 +00:00
Maxime Coste
def4221ac7 Pass a BufferRange to highlighters, fix subregions
Regions highlighter can now correctly be applied to only subrange
of the buffer, fixing some corner cases in recursive regions.
2014-12-02 19:56:17 +00:00
Maxime Coste
e38ba6ce3d Add scope class and encapsulate Options, Keymaps, Aliases and Hooks in it 2014-10-30 14:04:57 +00:00
Maxime Coste
185b980718 Add scoped aliases
aliases are now stored in window, buffer, or globally.
2014-10-30 14:02:13 +00:00
Maxime Coste
372ba2936f Small formatting fix 2014-10-27 13:22:42 +00:00
Maxime Coste
b2e90fe21e Refactor highlighters, use an interface with virtual methods 2014-10-22 13:54:03 +01:00
Maxime Coste
17d591b61c scrolloff is now a line,column pair
Fixes #152
2014-10-06 19:21:32 +01:00
Maxime Coste
5092494427 Add support for target column preservation
Fixes #64
2014-09-09 19:42:57 +01:00
Maxime Coste
ea3e92aa5e SelectionList know its buffer and timestamp 2014-05-13 20:09:06 +01:00
Maxime Coste
8546788b43 Refactor LineAndColumn coordinates
BufferCoord -> ByteCoord
DisplayCoord -> CharCoord

Moved their definition along with LineAndColumn into coord.hh
2014-05-07 19:53:45 +01:00
Maxime Coste
e1a9d5f71e Fix clang compilation 2014-04-02 22:33:52 +01:00
Maxime Coste
2159fc9563 Rename selections first,last to more explicit anchor,cursor 2014-01-28 19:06:52 +00:00
Maxime Coste
4f4a626754 Fix adapt_view_pos when the cursor is not on a display atom by itself 2014-01-21 18:52:51 +00:00
Maxime Coste
5cffc48efc Pass a HighlightFlags parameter to highlighters
When only highlighting for finding character position on screen
pass HighlightFlags::MoveOnly so that non moving highlighters do
not need to run.
2014-01-18 01:59:37 +00:00
Maxime Coste
c0973075fa Get rid of Editor for good
ClientManager now stores only the free windows, clients take
ownership of its own.
2013-12-20 20:14:57 +00:00
Maxime Coste
d1ac813f61 Pass a Context rather than a Window to highlighters 2013-12-16 23:24:08 +00:00
Maxime Coste
ae75594d25 Window: refactor center_selection/display_selection_at
Take the line we are intersted in as a parameter rather than getting
the main selection last char line.
2013-12-16 19:08:19 +00:00
Maxime Coste
9b6639eb27 Remove Editor::move_selections 2013-12-15 14:14:52 +00:00
Maxime Coste
6afef079b6 Remove Editor::main_selection(|index), directly use the SelectionList method 2013-12-14 14:38:17 +00:00
Maxime Coste
2d55ff5feb Window: forget timestamp when options changes 2013-11-28 18:48:38 +00:00
Maxime Coste
ad275d1d1c Extract InputHandler from Client 2013-11-14 18:09:15 +00:00
Maxime Coste
90d499b94d Add a WinClose hook 2013-10-26 18:51:25 +01:00
Maxime Coste
2c09da50be Add key mapping support 2013-10-25 00:30:46 +01:00
Maxime Coste
61cc53b325 Support highlighters that add new lines in scroll_to_keep_cursor_visible 2013-09-27 19:16:49 +01:00
Maxime Coste
3862b5cbb8 LineAndColumns: always pass by value 2013-07-26 01:50:09 +02:00
Maxime Coste
d6425f1d50 merge AtomContent into DisplayAtom 2013-07-24 13:55:57 +01:00
Maxime Coste
62fdacb757 Add scroll left/right support 2013-07-24 01:38:30 +02:00
Maxime Coste
8633a37dad Try to keep the selection start visible if possible 2013-07-24 01:34:00 +02:00
Maxime Coste
c7e52a650d DisplayLine no longer map to a single buffer line, but to a buffer range 2013-07-24 01:33:12 +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
2dcdc0cf4b more horizontal scrolling fixes 2013-06-29 16:50:51 +02:00
Maxime Coste
e510bf8b96 Fix horizontal scrolling support with replaced buffer ranges
tab character were not properly handled when scrolling horizontally
2013-06-28 00:03:11 +02:00
Maxime Coste
60dfeb2821 fix highlighting bug with inserting at eol on lines with tabs 2013-06-21 18:50:45 +01:00
Maxime Coste
70bf71e51f remove Buffer:char_{distance,advance} use line access instead 2013-06-06 19:44:07 +02:00
Maxime Coste
5c2e3b25fa Window: use AtomContent::length in scroll_to_keep_cursor_visible_ifn 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
52b77c1915 window, editor: take coords rather than iterators parameters 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