Maxime Coste
40fb56c87a
Small code cleanup
2016-10-04 19:37:17 +01:00
Maxime Coste
35559b65dd
Support codepoints of variable width
...
Add a ColumnCount type and use it in place of CharCount whenever
more appropriate, take column size of codepoints into account for
vertical movements and docstring wrapping.
Fixes #811
2016-10-01 13:45:00 +01:00
Maxime Coste
a7005ec74b
Add a char_length(Buffer&, const ByteCoord&, const ByteCoord&) util
2016-07-28 09:41:47 +01:00
Maxime Coste
8dcffd8f5a
Initial, WIP spelling implementation
...
Add a ranges highlighter that takes a timestamped list of ranges and
associated face. Add a spell.kak file that uses aspell pipe interface
to fill a range-faces option.
2015-12-17 04:07:49 +00:00
Maxime Coste
2b4b73ae8e
Remove the default_face parameter of parse_display_line
...
No need to define a default face there, we will pass a default face
to UserInterface::draw_status later.
2015-09-20 11:34:13 +01:00
Maxime Coste
b3e0e27d1f
Do not allow '\n' in display lines, replace with a space
2015-09-20 11:23:10 +01:00
Maxime Coste
6bc5f8c3a3
Add simple markup support to generate display lines from strings
...
The syntax is simply {face} to enable the given face, use \{ to
escape a {, and \\ to escape a \.
2015-09-19 12:19:17 +01:00
Maxime Coste
2946504a17
Improve column highlighter to cooperate better with other highlighters
...
Fixes #268
2015-07-23 13:58:23 +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
3c1a325b6f
Refactor String, use a common StringOps interface, hide std::string
2015-03-10 19:50:22 +00:00
Maxime Coste
3a817e2f96
Cleanup includes
2014-11-12 21:27:07 +00:00
Maxime Coste
a32b49acd1
Rename ColorPair to Face and ColorRegistry to FaceRegistry
...
Face also stores the attributes
2014-07-11 00:27:43 +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
bf84f5dcef
Fix compilation with OSX C++ lib
2014-04-02 22:41:06 +01:00
Maxime Coste
bd80cf0404
Add DisplayAtom::check_invariant method
2013-12-12 13:45:08 +00:00
Maxime Coste
277b02eee6
Add experimental region_ref highlighter
...
highlights a region using another highlighter.
2013-12-11 23:19:24 +00:00
Maxime Coste
d6425f1d50
merge AtomContent into DisplayAtom
2013-07-24 13:55:57 +01: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
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
d5b190369a
DisplayBuffer: use coords rather than iterators
2013-05-30 13:59:38 +02:00
Maxime Coste
4ab5c7a203
DisplayBuffer: optimize Text and ReplacedBufferRange as well
2013-05-02 18:57:15 +02:00
Maxime Coste
5adee4a6a7
rename assert to kak_assert to avoid collisions
2013-04-09 20:04:11 +02:00
Maxime Coste
f540566b1b
UserInterface: status line messages are now DisplayLines
...
This add color support for the status line
2013-04-04 18:50:00 +02:00
Maxime Coste
d3f586f378
DisplayBuffer::split does not check if the split is on a character boundary
2013-03-18 23:34:40 +01:00
Maxime Coste
f677d4ba32
Use a ColorPair in DisplayAtoms instead of separate fg/bg colors
2013-03-06 20:28:02 +01:00
Maxime Coste
98b6618658
merge contiguous DisplayAtoms after highlighting DisplayBuffer
2012-10-22 13:20:02 +02:00
Maxime Coste
ed592a3005
DisplayAtom: add utf8 sanity check
2012-10-08 14:28:54 +02:00
Maxime Coste
5602bc10e8
DisplayAtom: only let DisplayLine touch m_begin and m_end
2012-10-08 14:28:38 +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
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
d092afead9
make DisplayBuffer::atom_containing easier to understand
2012-07-03 21:12:05 +02:00
Maxime Coste
d7e1cab116
DisplayAtom: support empty replacement
2012-07-03 19:13:16 +02:00
Maxime Coste
30d9e10ac6
DisplayBuffer optimization, suppressed some paranoid checks
2012-05-29 00:33:55 +00:00
Maxime Coste
dd7228b098
fix DisplayBuffer::atom_containing when where is before first atom
2012-05-04 06:39:03 +00:00
Maxime Coste
af5c528f04
use std::upper_bound in DisplayBuffer::atom_containing to run in O(log n)
2012-04-05 02:00:34 +00:00
Maxime Coste
df0f7b4689
rename BufferString to String
2012-03-08 21:23:29 +00:00
Maxime Coste
a1a57ea137
DisplayBuffer: fix DisplayAtom::iterator_at
2011-11-16 21:03:32 +00:00
Maxime Coste
d2b9cd6e60
DisplayBuffer: split now preserve iterator parameter
...
that means that the given iterator points to the first part of the
split (instead of the second in previous implementation).
2011-11-14 14:10:11 +00:00
Maxime Coste
57b55a5824
DisplayBuffer: deactivate too expensive check
2011-10-24 19:27:36 +00:00
Maxime Coste
fffa405bfd
DisplayBuffer: overload atom_containing with a version taking an iterator to search start
2011-10-23 20:26:30 +00:00
Maxime Coste
32e01947fa
DisplayBuffer: store atoms in a std::list instead of a vector
2011-10-18 13:59:32 +00:00
Maxime Coste
c7876f0ba3
DisplayBuffer: remove some check_invariant, overhead is too noticeable
2011-10-18 00:56:18 +00:00
Maxime Coste
79ee27dae7
DisplayBuffer: deinline insert method and add atom_containing method
2011-10-17 19:00:38 +00:00
Maxime Coste
88e31d8cce
DisplayBuffer: allow empty atoms, with begin == end
2011-10-17 18:59:35 +00:00
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
10106e8c8e
DisplayBuffer: do not store content in atom, begin and end are sufficient
2011-10-07 14:19:58 +00:00
Maxime Coste
e351acd997
Window: fix blink_void
2011-09-29 14:23:46 +00:00
Maxime Coste
834e2d2fe3
DisplayBuffer: check_invariant method to assert atoms consistency
2011-09-29 09:10:27 +00:00