1
1
Граф коммитов

8721 Коммитов

Автор SHA1 Сообщение Дата
Benno Schulenberg
6ab754676a build: update the conditional placement of the "Go To Line" menu item
When either only --disable-justify or --disable-speller is used, the
"Go To Line" item should not be placed after the ^C Position item, to
keep the subsequent items (Undo, Redo, and so on) nicely paired.

(Things changed since the Linter is no longer bound to ^T by default.)
2020-03-13 12:24:44 +01:00
Benno Schulenberg
9917a05f04 tweaks: exclude a function when compiled without spell-checking support 2020-03-13 11:59:08 +01:00
Benno Schulenberg
fcda76f684 build: restore non-UTF8 fallbacks, to allow compiling with --disable-utf8
Commits b2c63c3d and 004af03e from yesterday mistakenly removed those
calls.
2020-03-13 11:43:31 +01:00
Benno Schulenberg
639f37669a docs: remove the note saying that nanorc files must be in Unix format
Since commit 98f038ad from a month ago, nanorc files do not need to be
in Unix format (LF) but may also be in DOS (CR+LF) and Mac (CR) format.
2020-03-12 19:03:02 +01:00
Benno Schulenberg
6d720bf7b2 tweaks: improve two comments, and remove an unneeded one 2020-03-12 17:18:10 +01:00
Benno Schulenberg
f3b030c8e5 tweaks: condense a fragment of code
Leave the skipping of subsequent blanks to the succeeding code.
2020-03-12 16:59:27 +01:00
Benno Schulenberg
6b8b7c9d55 tweaks: elide a supporting variable, to make four loops slightly faster
At the cost of making the return statements slower.  But, all-in-all,
this should be slightly quicker.
2020-03-12 16:47:39 +01:00
Benno Schulenberg
21ed79938e tweaks: normalize the indentation after the previous two changes 2020-03-12 15:54:19 +01:00
Benno Schulenberg
004af03ea5 tweaks: remove non-UTF-8 code from three more functions 2020-03-12 15:54:19 +01:00
Benno Schulenberg
b2c63c3d3c chars: optimize a function for the most common blanks: space and tab
Also, do not bother to provide separate code for the non-UTF-8 case.
Instead, optimize for plain ASCII characters.
2020-03-12 15:54:19 +01:00
Benno Schulenberg
ae139021eb tweaks: rename four more functions, to get rid of an abbreviation
Also, improve their comments.
2020-03-12 15:54:19 +01:00
Benno Schulenberg
f6dedf3598 tweaks: rename another function, to remove the obscuring abbreviation 2020-03-12 15:54:19 +01:00
Benno Schulenberg
8003842e5c tweaks: rename a function, to remove an obscuring abbreviation
The "mb" made the name harder to read.  Also, the function is
not only for multibyte characters but for any character.
2020-03-12 15:53:49 +01:00
Benno Schulenberg
01477d3b81 justify: never break a line in leading whitespace
This fixes https://savannah.gnu.org/bugs/?57984.

The bug was old -- it existed since at least version 2.0.6.
2020-03-12 10:15:57 +01:00
Benno Schulenberg
ebf9279f95 tweaks: rename two more functions, to match the style of others 2020-03-11 19:47:21 +01:00
Benno Schulenberg
304548ef82 tweaks: rename two functions, to match the style of others 2020-03-11 19:45:06 +01:00
Benno Schulenberg
dd6f129c3c tweaks: rename two functions, for shortness 2020-03-11 19:43:03 +01:00
Benno Schulenberg
c2f007afc5 tweaks: trim an unnecessary detail from an error message 2020-03-11 14:23:22 +01:00
Benno Schulenberg
8dc83951ee tweaks: normalize a translator hint, update one, and add another 2020-03-11 14:21:08 +01:00
Benno Schulenberg
b7dc5abca7 tweaks: rename two more variables, to harmonize with two others 2020-03-11 12:53:39 +01:00
Benno Schulenberg
8b784785ec tweaks: rename two variables, for distinctiveness 2020-03-11 12:23:07 +01:00
Benno Schulenberg
750b51c343 copyright: update to the current year for significantly changed files 2020-03-11 11:52:15 +01:00
Benno Schulenberg
e09ed765a1 syntax: nanorc: colorize 'rawsequences', not the obsolete 'rebindkeypad'
Bug existed since version 4.0, commit b596639f.
2020-03-10 16:21:02 +01:00
Benno Schulenberg
70a765e387 feedback: give a clearer message when trying to justify an empty region
Also, increase the level of the message, as trying to justify an empty
selection is a user error.
2020-03-10 15:58:30 +01:00
Benno Schulenberg
c65fa25ce2 docs: mention that ^[ (Esc) is unbindable, and explain why 2020-03-10 15:55:19 +01:00
Benno Schulenberg
cbbfebbc7a bindings: remove the translation of ^H to Backspace on the BSDs
This avoids an unintended rebinding of the <Backspace> key
on terminal emulators.

This fixes https://savannah.gnu.org/bugs/?57981.
Reported-by: Ciprian Tomoiaga <ciprian.tomoiaga@gmail.com>.
2020-03-10 14:28:55 +01:00
Benno Schulenberg
9d499c769b justify: do not take an empty line as template for first-line indentation
This fixes https://savannah.gnu.org/bugs/?57437.
2020-03-10 10:56:05 +01:00
Benno Schulenberg
dad2b5541e tweaks: rename a variable, for aptness 2020-03-10 10:50:27 +01:00
Benno Schulenberg
56960ce05e tweaks: reshuffle some stuff, to have related things together
Also for compactness, and not to use 'lead_len' for two purposes.
2020-03-10 10:45:46 +01:00
Benno Schulenberg
e247be69bf justify: when the cursor is at the left edge, keep it there
Only when the endpoint of the selection is actually IN a leading part,
then it should be advanced to include the whole leading part, so that
the succeeding paragraph will get the proper first-line indentation.
2020-03-10 10:32:21 +01:00
Benno Schulenberg
e209686835 justify: give the first line of a marked region its proper indentation
When justifying a selection from the middle of a paragraph, the first
line of both that selection and of the new paragraph after it should
get the same indentation as the first line of the original paragraph.

This fulfills https://savannah.gnu.org/bugs/?56308.
2020-03-10 10:29:49 +01:00
Benno Schulenberg
047936c338 tweaks: reshuffle an assignment and a free() 2020-03-09 14:28:57 +01:00
Benno Schulenberg
ca0571ea52 tweaks: remove an unneeded indirection
The concatenating function does not change the passed linestruct.
The data yes, but not the linestruct itself.
2020-03-09 14:25:41 +01:00
Benno Schulenberg
655cf9573f tweaks: always determine the second lead, to simplify the rewrap call
Also rename some variables.
2020-03-09 14:11:47 +01:00
Benno Schulenberg
c457f744ef justify: trim the leading blanks of a marked region at the right moment
This fixes https://savannah.gnu.org/bugs/?57977.

Bug existed since commit 5310a355 from three hours ago.
2020-03-09 14:05:18 +01:00
Benno Schulenberg
8f3ea23ece tweaks: rename a variable, to not be a substring of a function name 2020-03-09 12:31:10 +01:00
Benno Schulenberg
3225c71ecd justify: when appropriate, move end point of marked region forward
So that also the line after the newly made paragraph gets the
leading part that belongs to the start of a new paragraph.

This https://savannah.gnu.org/bugs/?57974.

Bug existed since version 4.0, since the justifying
of a marked region was introduced.
2020-03-09 12:15:01 +01:00
Benno Schulenberg
5310a355ef tweaks: reshuffle the trimming of leading whitespace, for compactness 2020-03-09 11:43:50 +01:00
Benno Schulenberg
d7875cdf4f tweaks: when appropriate, move starting point of justified region back
This makes things simpler, so that I can understand them.
2020-03-09 11:33:16 +01:00
Benno Schulenberg
dc05defb8a tweaks: rename four variables, to be a bit more telling 2020-03-09 11:10:07 +01:00
Benno Schulenberg
98c11d0a82 tweaks: reshuffle some code, in preparation for improving it 2020-03-09 11:09:56 +01:00
Benno Schulenberg
14f1652842 tweaks: move a function to its proper place in the order of things 2020-03-09 09:44:43 +01:00
Benno Schulenberg
d4b97a08cd tweaks: elide a variable and an unneeded iteration 2020-03-08 16:55:02 +01:00
Benno Schulenberg
c934c1d71b justify: trim prefixed whitespace when justifying a marked region
This fixes https://savannah.gnu.org/bugs/?56307.

Bug existed since version 4.0, when the justifying
of a marked region was introduced.
2020-03-08 16:18:34 +01:00
Benno Schulenberg
a16315a65f tweaks: remove a redundant statement, a spurious reference to 'cutbottom'
This assignment should have been removed in commit f5ac8c1e from
six years ago, as it became superfluous then.  Later changes made
'cutbottom' become valid only when something had actually been cut.
2020-03-08 15:50:55 +01:00
Benno Schulenberg
d6beca5dcf justify: do not copy too many bytes when trimming leading whitespace
This fixes https://savannah.gnu.org/bugs/?57972.

Bug existed since version 4.0, commit 877a6498.
2020-03-08 15:09:40 +01:00
Benno Schulenberg
9d7e62be1a tweaks: rename two variables, to be different or for more contrast
Also, invert the logic of the second.
2020-03-08 14:12:45 +01:00
Benno Schulenberg
5c008726f0 tweaks: rename two variables, to harmonize with two others 2020-03-08 14:04:29 +01:00
Benno Schulenberg
8c506d86af tweaks: rename two variables, to suit both the marked and unmarked case 2020-03-08 13:57:04 +01:00
Benno Schulenberg
db7a49edc6 tweaks: create an undo item earlier, and discard it when needed
This avoids having to temporariyly store and then later fill in
the original cursor position.
2020-03-08 13:40:38 +01:00