Maxime Coste
1709886873
avoid literal eol in status lines, replace them with another symbol
2017-08-29 10:01:43 +07:00
Maxime Coste
3efc406d57
Optimize DisplayBuffer::optimize()
...
Previous implementation was erasing in the middle of the atoms
vector each time two atoms were merged, leading to a move of
all following atoms.
2017-08-23 08:42:00 +07:00
Maxime Coste
4ed790632d
Fix some other uses of invalid buffer coordinates in display code
2017-06-15 18:12:21 +01:00
Maxime Coste
0dec1e3a91
Remove unused only_buffer mode for DisplayLine::trim
2017-06-09 15:30:13 +01:00
Maxime Coste
f310db639c
Rework partial line display logic
...
Instead of highlighting full lines and then trim them to make them
fit in the window, highlight only the visible portion, and rely on
the compute_display_setup system introduced for wrapping to setup
our buffer range correctly
2017-06-09 13:22:32 +01:00
Maxime Coste
12c498a0bd
Distinguish between BufferRanges and InclusiveBufferRanges
...
Fixes #1257
2017-05-08 12:34:57 +01:00
Dan Rosén
5a403a9611
Increase modelinefmt configuration power
2017-03-11 21:43:51 +01:00
Frank LENORMAND
aecc0fbb0f
src: Fix the string conversion of range faces
...
Fixes #1250
2017-03-01 22:16:35 +03:00
Maxime Coste
dcd8f6ef01
Apply clang-tidy modernize to the codebase
2017-01-08 22:39:01 +00:00
Maxime Coste
1383614a5f
Fix markup parsing handling of antislash escapes
...
Antislashes did not need to immediately precede a face spec to
escape it, it could be in any characters before it.
2016-12-07 13:43:27 +00:00
Maxime Coste
7c6c6871ce
BufferRange option syntax support <line>.<column>+<len> and is inclusive
...
Fixes #864
2016-10-26 22:58:12 +01:00
Maxime Coste
6bfc68d4f3
Rename DisplayAtom::Types to avoid conflicts with struct BufferRange
2016-10-13 19:55:15 +01:00
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