- 29 Aug, 2016 1 commit
-
-
Benno Schulenberg authored
-
- 07 Aug, 2016 2 commits
-
-
Benno Schulenberg authored
-
Benno Schulenberg authored
It is quicker to do a handful of superfluous compares at the end of each line than it is to compute and keep track of and compare the remaining line length the whole time. The typical line is some sixty characters long, the typical search string ten characters -- with a shorter search string the speedup is even higher: some fifteen percent. Only when the string is longer than half the average line length does searching become slower with this new method. All this for a UTF-8 locale. For a C locale it makes no difference.
-
- 06 Aug, 2016 3 commits
-
-
Benno Schulenberg authored
-
Benno Schulenberg authored
Now that mbstrncasecmp() does the right thing, there is no need any more to verify that only a valid multibyte sequence was matched. (See https://savannah.gnu.org/bugs/?45579 for a test case.) Also, this will make it possible to search for invalid sequences. (Currently it isn't possible to enter a search string with invalid characters, but... a user might edit the search history file. And if pasting at the prompt is implemented, it will be trivial to enter invalid sequences if you have a file that contains them.)
-
Benno Schulenberg authored
Persisting might lead to count 'n' reaching zero, which would mean that the needle has matched, which is wrong when one of the strings contains an invalid or incomplete multibyte sequence.
-
- 05 Aug, 2016 1 commit
-
-
Benno Schulenberg authored
That is: don't run towlower() on the two differing bytes when having reached the end of one of the strings. This fixes https://savannah.gnu.org/bugs/?48700. In the bargain, don't do the conversion to lowercase twice. Furthermore, persist when encountering invalid byte sequences -- until finding bytes that differ.
-
- 04 Aug, 2016 2 commits
-
-
Benno Schulenberg authored
-
Benno Schulenberg authored
The needle is never part of the hay -- it is always a separate string. (And even if needle and haystack were identical, the routine works fine, the case does not need special treatment.)
-
- 03 Aug, 2016 1 commit
-
-
Benno Schulenberg authored
This fixes https://savannah.gnu.org/bugs/?48660.
-
- 01 Aug, 2016 1 commit
-
-
Benno Schulenberg authored
-
- 22 Jul, 2016 1 commit
-
-
Benno Schulenberg authored
-
- 21 Jul, 2016 1 commit
-
-
Benno Schulenberg authored
This fixes https://savannah.gnu.org/bugs/?48578.
-
- 13 Jul, 2016 1 commit
-
-
Benno Schulenberg authored
This allows the user to specify which other characters, besides the default alphanumeric ones, should be considered as part of a word, so that word operations like Ctrl+Left and Ctrl+Right will pass them by. Using this option overrides the option --wordbounds. This fulfills https://savannah.gnu.org/bugs/?47283.
-
- 12 Jul, 2016 2 commits
-
-
Benno Schulenberg authored
-
Benno Schulenberg authored
-
- 30 Jun, 2016 2 commits
-
-
Benno Schulenberg authored
So, slightly speed up the functions that check for those.
-
Benno Schulenberg authored
Invalid multibyte sequences get depicted with the Replacement Character, and unassigned codepoints are shown as if they were a space. Both have a width of one.
-
- 29 Jun, 2016 4 commits
-
-
Benno Schulenberg authored
Use knowledge of UTF-8 instead of converting to wide characters first.
-
Benno Schulenberg authored
-
Benno Schulenberg authored
Any control character is represented by a ^ plus an ASCII character.
-
Benno Schulenberg authored
Instead of showing the upper control codes like this: ^À ^Á ^Â ^Ã ^Ä ^Å ^Æ ^Ç ^È ^É ^Ê ^Ë ^Ì ^Í ^Î ^Ï ^Ð ^Ñ ^Ò ^Ó ^Ô ^Õ ^Ö ^× ^Ø ^Ù ^Ú ^Û ^Ü ^Ý ^Þ ^ß show them like this: ^` ^a ^b ^c ^d ^e ^f ^g ^h ^i ^j ^k ^l ^m ^n ^o ^p ^q ^r ^s ^t ^u ^v ^w ^x ^y ^z ^{ ^| ^} ^~ ^= The lower control codes continue to be shown like this: ^@ ^A ^B ^C ^D ^E ^F ^G ^H ^I ^J ^K ^L ^M ^N ^O ^P ^Q ^R ^S ^T ^U ^V ^W ^X ^Y ^Z ^[ ^\ ^] ^^ ^_ The representation of DEL (0x7F) continues as ^?. Further, use knowledge of UTF-8 to avoid a roundtrip through wide characters.
-
- 27 Jun, 2016 2 commits
-
-
Benno Schulenberg authored
By removing from their main loops a condition that occurs just once.
-
Benno Schulenberg authored
-
- 01 Jun, 2016 5 commits
-
-
Benno Schulenberg authored
When running in a non-UTF locale, and when strncasecmp() suffers from the same defect as strncmp(), make sure not to pass a length with the high bit set.
-
Benno Schulenberg authored
The function is_cntrl_mbchar() has always been called successfully before calling control_mbrep(), so the passed character *is* a valid sequence.
-
Benno Schulenberg authored
-
Benno Schulenberg authored
-
Benno Schulenberg authored
-
- 30 May, 2016 1 commit
-
-
Benno Schulenberg authored
-
- 27 May, 2016 3 commits
-
-
Benno Schulenberg authored
Instead of parsing every multibyte character twice, first with parse_mbchar() and then with mbtowc(), just let mbtowc() do all the work. This makes searching for a fixed string twice as fast. This also gets rid of four variables and lots of memory allocations. (And, more importantly: it stops nano messing up the internal state of the multibyte-to-wide character conversion, and thus would make the calls to mbtowc_reset() superfluous.)
-
Benno Schulenberg authored
-
Benno Schulenberg authored
-
- 24 May, 2016 1 commit
-
-
Benno Schulenberg authored
-
- 05 Apr, 2016 1 commit
-
-
Benno Schulenberg authored
-
- 29 Mar, 2016 1 commit
-
-
Benno Schulenberg authored
(The measurable effect (during long searches, for example) is zero, though.) git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5773 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
-
- 16 Feb, 2016 1 commit
-
-
Benno Schulenberg authored
and two other minute tweaks. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5649 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
-
- 04 Sep, 2015 1 commit
-
-
Benno Schulenberg authored
Apparently there is /some/ state somewhere after all. Don't have time now to figure out where exactly. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5369 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
-
- 12 Aug, 2015 1 commit
-
-
Benno Schulenberg authored
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5354 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
-
- 23 Jul, 2015 1 commit
-
-
Benno Schulenberg authored
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5316 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
-