Commit Graph

8769 Commits (f52b6cf19f4f5c0f0aa3657a3742b5803decd366)

Author SHA1 Message Date
Benno Schulenberg f52b6cf19f copying: change the implementation, away from cutting plus copying back
First cutting the text to be copied (before copying it back into the
buffer) had unwanted side effects: it moved the cursor, and changed
the linestructs of the current line and the line where the mark was.

[This takes thirty more lines, but the idea is to later get rid of
the partitioning routines entirely.]
2020-03-30 16:55:17 +02:00
Benno Schulenberg 59040169ed tweaks: get rid of a bunch of annoying casts, and thus condense the code 2020-03-29 20:17:32 +02:00
Benno Schulenberg 8f6559828d files: make filtering of the entire buffer into a new buffer work again
This fixes https://savannah.gnu.org/bugs/?58076.

Bug existed since version 4.9, commit 477a9b33.
2020-03-29 18:04:36 +02:00
Benno Schulenberg 619962ee18 undo: when undoing a line cut, place the cursor back where it was
This fixes https://savannah.gnu.org/bugs/?58074.

Bug existed since version 4.9, commit ac612545.
2020-03-29 14:25:15 +02:00
Benno Schulenberg 7ebe44ac25 tweaks: rename a symbol, to be more accurate, and reshuffle two lines 2020-03-29 14:24:16 +02:00
Benno Schulenberg 0cc2104257 tweaks: elide a parameter, by calling the relevant function beforehand
This means that in most cases mark_is_before_cursor() is called twice:
once before get_region() is called, and once by get_region() itself.
This small duplication of effort is acceptable: the affected functions
are not time critical, and it makes the code shorter.
2020-03-29 13:22:17 +02:00
Benno Schulenberg 9a6158cd94 input: stop recognizing the raw escape sequences for F13 to F16
It is very unlikely that anyone uses those keystrokes: 1) no keyboard
has such keys; 2) the default bindings for these keys were removed a
year and a half ago, and no one complained; 3) for several years nano
did not recognize the modern xterm escape sequences for F13 to F16,
and no one ssh'ing from a new machine to an old machine complained.

The only people who might be affected by this removal are Konsole users:
a Konsole claims to be an xterm, but sends its own peculiar "Esc O 2 X"
sequences for F13 to F16.  Using the data from terminfo, ncurses will
not recognize those sequences, and will pass them untranslated to nano.
When nano now stops recognizing them too...  Well, let's see if there
are any Konsole users that use F13 to F16.
2020-03-29 12:04:37 +02:00
Benno Schulenberg 7d3aad403d options: make -S the short synonym of --softwrap
The form -$ is still accepted, but is deprecated.
2020-03-27 17:02:55 +01:00
Benno Schulenberg aa70f3d95e options: stop recognizing the obsolete --morespace and --smooth
They have been no-ops for a year.

Also remove their documentation entries.

(The nanorc options still remain -- to be removed next year.)
2020-03-27 16:54:09 +01:00
Benno Schulenberg ec457dc33a tweaks: rename a variable, for shortness and contrast 2020-03-27 15:29:48 +01:00
Benno Schulenberg 31b978ca3e docs: reduce the TODO file to a reference to the bug tracker on Savannah
All those items that were marked as DONE are not actually TO-DO items.

Also, most of those things are mentioned in the IMPROVEMENTS file too.
So, add the few that were missing there, and condense/rewrap some.
2020-03-26 19:27:46 +01:00
Benno Schulenberg 9a4586557b build: stop distributing a nano.spec file
We do not provide an RPM package.  And distros like Fedora, Mageia,
and Suse have their own spec files -- they don't need ours.  And in
case anyone would like to create their own RPM package from nano,
they can look at the spec files of those distros.
2020-03-26 17:08:36 +01:00
Benno Schulenberg 02c48dc8a4 tweaks: delete another pointless ChangeLog 2020-03-26 13:17:41 +01:00
Benno Schulenberg 384c9aaad3 tweaks: delete a ChangeLog that is no longer updated and is incomplete
It is incomplete at the top, in the middle, and at the bottom.

Also, the Makefile from gettext automatically includes this ChangeLog
in a release tarball when the ChangeLog exists.  This is an unneeded
burden on the tarball, as I don't think any distro installs this file
in nano's doc directory.  And if any does, I don't think they should:
it is not helpful for using nano.

If anyone would like to know more about the history of a PO file,
since we now have git, they can do something like:

        git log -p po/<LANGUAGECODE>.po |
        grep -e Revision-Date -e Last-Translator |
        grep -A1 "^\+.PO" | less
2020-03-26 13:17:21 +01:00
Benno Schulenberg 0c249de9e5 tweaks: for each version, mention the changes to the PO files last
Also, rewrap some lines, and  normalize how function names are listed,
back until version 0.9.9.
2020-03-26 12:18:22 +01:00
Benno Schulenberg abf4658ab9 tweaks: uniformize some old translator credits
And add two of the earliest that were missing.
2020-03-25 19:37:09 +01:00
Benno Schulenberg ba25d0df1d tweaks: fix twenty typos, in old Changelogs and in some comments
They were found by a run of 'codespell' at https://fossies.org/.

Reported-by: Jens Schleusener <Jens.Schleusener@fossies.org>
2020-03-25 16:57:43 +01:00
Benno Schulenberg e7fa43d600 po: update translations and regenerate POT file and PO files 2020-03-24 11:21:03 +01:00
Benno Schulenberg 49a84f9e8a bump version numbers and add a news item for the 4.9 release 2020-03-24 11:11:22 +01:00
Benno Schulenberg 6ee657b7d8 docs: trim some TODO items, and condense several others
Remove the suggested clever bracket matching.
2020-03-23 11:30:34 +01:00
Benno Schulenberg 6866ea0d0e justify: skip over in-line whitespace only, not over leading whitespace
This fixes https://savannah.gnu.org/bugs/?58028.

Bug existed since commit 107abd26 from yesterday.
2020-03-23 11:00:17 +01:00
Benno Schulenberg 34d38fe1c6 undo: treat a cut-until-end-of-buffer like a backward marked region
This fixes https://savannah.gnu.org/bugs/?58024.

Bug existed since commit ac612545 from two weeks go.
2020-03-22 19:16:22 +01:00
Benno Schulenberg b17309b652 tweaks: when extending the marked region, include also exotic blanks
Just in case someone uses multibyte whitespace characters.
2020-03-22 18:45:46 +01:00
Benno Schulenberg 107abd2654 justify: skip over blanks after the region, to not skew the indentation
This fixes https://savannah.gnu.org/bugs/?58023.

Bug existed since commit 3225c71e from six days ago.
2020-03-22 17:48:39 +01:00
Benno Schulenberg f528ced22b tweaks: use a symbol instead of a number, and drop two unneeded casts 2020-03-22 14:29:10 +01:00
Benno Schulenberg 71628ad0b8 build: fix compilation for --enable-tiny --enable-justify 2020-03-22 13:41:28 +01:00
Benno Schulenberg 481529e865 input: accommodate silly emulators that have LF instead of CR in a paste
Even though a user would never type ^J to start a new line, accept it
as a synonym of <Enter> (^M) in a bracketed paste, because apparently
bash accepts it as a synonym too.

This works around https://savannah.gnu.org/bugs/?58010.
2020-03-20 14:25:27 +01:00
Benno Schulenberg bc6645f753 tweaks: move two functions to before the ones that call them 2020-03-19 15:12:40 +01:00
Benno Schulenberg c1ca578853 tweaks: unwrap four lines, and use explicit codes where possible
The explicit codes are slightly faster, and they show the correspondence.
2020-03-19 14:55:39 +01:00
Benno Schulenberg 4ce2e146ea tweaks: elide three unneeded #defines
Backspace and Tab and Carriage Return have standard backslash escapes.
2020-03-19 14:40:51 +01:00
Benno Schulenberg 39ed865043 docs: improve the descriptions of --softwrap and 'set softwrap' 2020-03-19 13:10:28 +01:00
Benno Schulenberg 0de4700002 gnulib: update to its current upstream state 2020-03-17 09:56:54 +01:00
Benno Schulenberg ea95ad24be usage: improve the description of --softwrap
Concisely say what the option actually does.
2020-03-17 09:51:03 +01:00
Benno Schulenberg 415e55ff37 tweaks: move a function to before the one that calls it 2020-03-16 10:17:15 +01:00
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