Maxime Coste
6604aa66f7
Treat non printable characters as zero-width instead of -1 width
...
This fix a bug when opening a file where a line has a lot of unprintable
chars (like a binary file) which was confusing Kakoune into considering
that the line length in column was negative.
2017-07-07 10:57:32 +09:00
Maxime Coste
f41d78083a
Use the extra_word_chars option in word based normal commands
...
the completion_extra_word_chars is now gone, superseeded by
extra_word_chars that gets used both for completion and for normal mode.
Fixes #1304
2017-06-26 15:28:41 +01:00
Maxime Coste
e264d189eb
Add noexcept specifiers to unicode and utf8 functions
2017-04-23 12:47:26 +01:00
Maxime Coste
8703f30063
Tweak some character categorization function implementations
2017-02-23 00:56:40 +00:00
Maxime Coste
dcd8f6ef01
Apply clang-tidy modernize to the codebase
2017-01-08 22:39:01 +00:00
Maxime Coste
12856066b1
Cleanup include dependencies a bit
2016-11-28 23:58:08 +00:00
Maxime Coste
d2a324d3c4
Treat '\n' as 1 column wide
...
Fixes #842
2016-10-04 19:37:43 +01:00
Maxime Coste
8cc30a8ca0
Enable _XOPEN_SOURCE=700 on cygwin to get the wcwidth function
2016-10-01 13:46:55 +01:00
Maxime Coste
249ec4835e
Rename get_width to codepoint_width
2016-10-01 13:45:00 +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
1834a67b87
Go back to libc locale and use c_regex_traits
...
Unfortunately, cygwin does not support c++ locales.
2016-05-19 21:45:23 +01:00
Maxime Coste
84f62e6ff2
Use C++ locale based functions instead of the libc ones
2016-05-11 09:49:45 +01:00
Maxime Coste
15e82518d3
Tweak categorize(Codepoint) implementation
2016-04-04 13:42:58 +01:00
Maxime Coste
1bf0a964ce
Move is_basic_alpha to unicode.hh
2015-11-15 13:24:39 +00:00
Maxime Coste
892c3647e4
Fix to_lower/to_upper handling to correctly support non unicode chars
...
require a proper unicode locale setup on the system
Fixes #94
2015-11-11 00:21:20 +00:00
Maxime Coste
28ebe776c0
Refactor select_arguments and slightly change behaviour for non-inner
...
non inner argument contains the argument, preceeding whitespaces,
and eventual ending comma, except for first arguments (that
contains the whitespaces after the comma), and last argument (that
contains the comma before it).
2015-07-01 23:47:22 +01:00
Maxime Coste
6974cfbf64
Use char32_t for Codepoint
2015-04-29 13:51:15 +01:00
Maxime Coste
bf02838816
Remove is_blank, which is identical to is_horizontal_blank
2015-04-15 00:34:00 +01:00
Maxime Coste
aadbd390c7
Use wide character function for categorizing codepoints
...
Previously we used the is... rather than isw...
These functions were not supporting non ascii characters correctly
2014-01-05 15:14:58 +00:00
Maxime Coste
0c4d523b22
Move template selectors to the header
2013-12-14 14:49:10 +00:00
Maxime Coste
7f4d906774
move is_horizontal_blank to unicode.hh
2013-11-17 23:06:40 +00:00
Maxime Coste
8ab7496058
use C isalnum instead of C++ std::isalnum
2013-07-15 13:49:50 +01:00
Maxime Coste
270e950cf1
sort includes directives
2013-04-09 20:05:40 +02:00
Maxime Coste
2854984c79
use std::isalnum for is_word implementation in order to support unicode
2013-02-26 18:54:11 +01:00
Maxime Coste
7a8366da2b
add a unicode.hh header for Codepoint related functions, s/utf8::Codepoint/Codepoint/
2012-10-09 19:15:05 +02:00