Commit Graph

8735 Commits

Author SHA1 Message Date
Benno Schulenberg
c20134c20d tweaks: rename a variable, away from a single letter 2020-03-16 10:15:01 +01:00
Benno Schulenberg
56308b3256 display: keep the help items aligned, by not writing too many characters
Only for the last item at the end of each of the two help lines there
are sometimes a few extra columns available.  Do not use these extra
columns also for the other help items, because apparently, when wmove()
lands in the second column of a double-width character, it does not
wipe out this character (replacing it with a space) but goes to the
next column instead, causing a misalignment of the text.

This fixes https://savannah.gnu.org/bugs/?57994.

Bug existed since version 1.3.12, commit e806ab84.
2020-03-16 09:44:12 +01:00
Benno Schulenberg
3d8cd65b1b tweaks: reshuffle a condition, for compactness 2020-03-15 19:01:07 +01:00
Benno Schulenberg
2b6924ef6e display: do not show a "[" double-width placeholder when softwrapping
The placeholder half-duplicates the character that is actually shown
at the beginning of the next row.  When NOT softwrapping, showing a
"[" before the ">" kind of makes sense: to avoid having a gaping gap
there.  But when softwrapping, all characters of the line will be on
the screen (except when going offscreen at the bottom), so there is
no need to show a placeholder for anything.

I imagine that when reading softwrapped Chinese or Japanese text,
things are easier to understand when no characters are shown that
are not actually in the text.

This avoids https://savannah.gnu.org/bugs/?57993.

Bug existed since version 2.8.6, commit 8490f4ac.
2020-03-15 17:00:05 +01:00
Benno Schulenberg
01d8b0e15d help: increase the minimum help-text width from 32 to 40 columns
Getting long words like "Rechtschreibprüfung" broken somewhere in
the middle doesn't look nice.
2020-03-15 14:04:57 +01:00
Benno Schulenberg
16f17f3f1b help: do not break a line inside the 17-column keystrokes area
When the description of a keystroke starts with a very long word,
or when it does not contain any spaces at all (like for Chinese
and Japanese), do not break in the blanks before the description
but instead break IN the description, at the edge of the screen.

In other words: when wrapping a help text, do not consider blanks in
the first 17 columns to be blanks (unless it is a continuation line).

This fixes https://savannah.gnu.org/bugs/?57987.

Bug existed since version 4.8, commit 1486f32d,
when the wrapping of help texts was improved.
2020-03-15 13:59:04 +01:00
Benno Schulenberg
09042f5499 tweaks: do some text alignments properly: with spaces, not tabs 2020-03-15 11:26:55 +01:00
Benno Schulenberg
3690d60b71 rcfile: rename bindable function 'suspendenable' to 'suspendable'
The name of a toggle function should match the name of the corresponding
option, like for 'mouse' and 'linenumbers' and 'smarthome' and such.
2020-03-15 11:17:46 +01:00
Benno Schulenberg
4dedb1c1b1 moving: do not put the cursor at end-of-line when in a help text
Keeping the invisible cursor at the left edge avoids any line getting
scrolled horizontally.

This fixes https://savannah.gnu.org/bugs/?57991.

Bug existed since version 2.8.2, since the help texts got generated
and displayed in a different way in order to become searchable.
2020-03-13 19:37:02 +01:00
Benno Schulenberg
067ee1a6b1 tweaks: highlight keystrokes in the documentation more consistently 2020-03-13 16:40:34 +01:00
Benno Schulenberg
0c1db4879e docs: update the missed occurrences of --suspendable / 'set suspendable' 2020-03-13 16:34:41 +01:00
Benno Schulenberg
02efc760bf tweaks: rename a symbol, to match the corresponding renamed option 2020-03-13 16:17:10 +01:00
Benno Schulenberg
a91bc04e04 docs: update the form of an option, --suspendable / 'set suspendable' 2020-03-13 15:58:56 +01:00
Benno Schulenberg
9a59cddcd4 options: rename --suspend to --suspendable, to make more sense 2020-03-13 15:54:24 +01:00
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