Commit Graph

5798 Commits (c661506681077c811e96483cafd93fbf50c1bf77)

Author SHA1 Message Date
Rishabh Dave 559858a3dd browser: don't seem to enter a directory when it is inaccessible
This fixes https://savannah.gnu.org/bugs/?48286.

Reviewed-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Rishabh Dave <rishabhddave@gmail.com>
2016-06-26 10:14:12 +02:00
Benno Schulenberg ddd9c7a022 tweaks: try to distinguish between keystrokes and characters
Keystrokes are single integers (aided by the flags meta_key and
func_key) but in the input stream they can be encoded as escape
sequences (a series of bytes).  Characters are values in byte
range, but in UTF-8 one character can consist of multiple bytes.

Also rename two variables, because the secondary input buffer
that they refer to contains only characters (mostly just one),
never any shortcuts; and there are too many "kbinput" already.
2016-06-25 20:34:09 +02:00
Benno Schulenberg 03c689c22c tweaks: normalize a type, and rewrap a line 2016-06-25 20:33:11 +02:00
Benno Schulenberg 5270dd8b32 tweaks: add a reporter's name 2016-06-25 20:03:25 +02:00
Benno Schulenberg f33796bee1 tweaks: elide an impossible case
Typing a Unicode code is always finished after at most six characters:
either retval == uni or retval == kbinput, but it can't be ERR.
2016-06-25 16:52:36 +02:00
Benno Schulenberg e679c518b1 tweaks: elide an unneeded variable 2016-06-25 16:52:36 +02:00
Luke Francl ba9214c689 syntaxes: add highlighting rules for Rust
With tweaks from Andrea Canciani, Ben Young, Tennix, and Dirkjan Ochtman.

This fulfills https://savannah.gnu.org/bugs/?48163.
2016-06-25 09:56:11 +02:00
Benno Schulenberg 68acc1dfc5 tabs: compute the number of required spaces without iterating 2016-06-24 14:56:41 +02:00
Benno Schulenberg 1a4ec6c2d3 moving: allow specifying negative numbers in "Go To Line"
The negatives are taken to mean: from the end of the file,
and: from the end of the line.

This fulfills https://savannah.gnu.org/bugs/?48248.
2016-06-24 14:47:02 +02:00
Benno Schulenberg 6bb30978fb tweaks: add a translator hint 2016-06-24 09:40:31 +02:00
Benno Schulenberg c0c30731c4 browser: don't use a term that is not explained in the documentation
Also, other messages that are about --operatingdir don't use the term
"confined" either.

Suggested-by: Mario Blättermann <mario.blaettermann@gmail.com>
2016-06-24 09:24:00 +02:00
Jordi Mallach 49eaa7c465 docs: bump pointers to the newest version available
Fix references to an old dist dir in FAQ and RPM spec file.
2016-06-23 19:53:58 +02:00
Jordi Mallach c2b199e926 docs: use https for nano-editor.org, and drop the www
Switch to https and drop the www. prefix for all occurrences of the
website URL.
2016-06-23 19:51:01 +02:00
Benno Schulenberg 80552aeab7 tweaks: elide an intermediate copy of some line data 2016-06-22 10:30:52 +02:00
Benno Schulenberg dfbabc0411 tweaks: fix a date and an email address 2016-06-22 10:30:42 +02:00
Benno Schulenberg 59b9b222c8 moving: ignore any number when ^Y or ^V is given
This fixes https://savannah.gnu.org/bugs/?48282.
2016-06-21 16:47:11 +02:00
Benno Schulenberg 79e3eaf73c linter: refresh the edit window in order to actually place the cursor
This fixes https://savannah.gnu.org/bugs/?48283.
2016-06-21 16:25:07 +02:00
Benno Schulenberg 9106cc8ecc main: let the main loop restore the main menu, if needed
Don't make it the responsibility of the executed functions to restore
the list of shortcuts of the edit window.  Just detect whether another
menu was displayed, and if so, redisplay the main menu.
2016-06-21 11:03:38 +02:00
Benno Schulenberg 17fb6dfdc0 tweaks: reshuffle two lines and improve two comments 2016-06-20 13:07:25 +02:00
Benno Schulenberg 95f417fa9a tweaks: rewrap a bunch of lines and some comments 2016-06-20 13:05:45 +02:00
Benno Schulenberg 49cb559c5b po: regenerated POT file, and updated PO files from TP 2016-06-17 15:49:20 +02:00
Benno Schulenberg f26e88bb52 tweaks: a few last tiny adjustments before release 2016-06-17 15:04:44 +02:00
Benno Schulenberg 8875acf912 po: correctly advertise whether new PO files have arrived
And don't bother running configure and make upstairs; here is enough.
2016-06-17 14:47:43 +02:00
Benno Schulenberg a025878466 po: delete an obsolete script
The way to update nano.pot is to run 'make nano.pot-update' in the po
subdir.  Updating a specific PO file is then done with 'make xx.po'.

(The script mistakenly included all leading comments, not just the
ones marked with "TRANSLATORS:".)
2016-06-17 13:59:45 +02:00
Benno Schulenberg 9aaa835858 docs: add a list of the important changes since version 2.2.6 2016-06-17 13:32:06 +02:00
Benno Schulenberg 627f04e028 docs: rename a file, to be less confusing
It sounded like an instigation to upgrade, or like a list of
instructions on how to upgrade.  But it is merely a list of
noteworthy changes -- what other packages put in the NEWS file.
2016-06-17 11:12:37 +02:00
Benno Schulenberg 158388c5a6 justify: enable cursor display also for the first keystroke afterward
This fixes https://savannah.gnu.org/bugs/?48246.
2016-06-16 20:40:09 +02:00
Benno Schulenberg 3e45c9c5cf version: cover the copyrights that are not assigned to the FSF 2016-06-15 21:28:11 +02:00
Benno Schulenberg 7165bd5c33 input: don't allocate too much, and don't move too many
To add a character, one does not need to allocate twice its size.
And the amount to be moved does not depend on the size of the new
character; it just needs to include the terminating zero.

(This fixes in do_output() the same logical mistakes that were fixed
in do_statusbar_output() last February, in acf19bd and 7c0e433.)
2016-06-14 17:00:22 +02:00
Benno Schulenberg 883373cd76 undo: start renumbering from the head of the paste, not from its tail
Because when undoing a paste at the end of the buffer, the tail line
probably does not exist any more.

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

(It would have been the proper fix for
https://savannah.gnu.org/bugs/?44488.)
2016-06-14 16:34:29 +02:00
Benno Schulenberg 9536edfcc6 add a news item for 2.6.0
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-06-14 09:44:39 +02:00
Benno Schulenberg efa42e4a88 docs: update the version number for the upcoming release
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-06-13 12:27:26 +02:00
Benno Schulenberg 3e5fcec76c remove the GNU marker from nano's name
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-06-13 12:22:33 +02:00
Benno Schulenberg 956fead2e1 browser: show an error message when selecting an inaccessible directory
This fixes https://savannah.gnu.org/bugs/?48007.

Tested-by: Rishabh Dave <rishabhddave@gmail.com>
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-06-13 11:15:20 +02:00
Benno Schulenberg aa09abe198 files: when the requested operating directory cannot be set, fail
Specifying an operating directory should either lead to a successfull
confinement, or nano should fail to start.

(Also: save the terminal settings as soon as possible, so that an early
die() will not restore uninitialized values.)

This fixes the first part of https://savannah.gnu.org/bugs/?47798 properly.
2016-06-12 11:13:45 +02:00
Benno Schulenberg 5aa1df37d1 files: recompute the multidata only when the applicable syntax changed 2016-06-08 14:17:30 +02:00
Benno Schulenberg ca2c808f69 files: free all the multidata when a file is saved, then recompute it
This fixes https://savannah.gnu.org/bugs/?48103.

(The fix is wasteful -- it should only discard the multidata if actually
the name *did* change, *and* if the applicable syntax changed.)
2016-06-08 13:31:18 +02:00
Benno Schulenberg d87c357abe tweaks: remove two redundant assignments
The mark has already been unset by do_cut_text().  And any assignment
to 'mark_begin' is useless when 'mark_set' is FALSE.
2016-06-07 19:53:27 +02:00
Benno Schulenberg ccffc548e1 text: after undoing or redoing something, unset the mark
This fixes https://savannah.gnu.org/bugs/?48108,
and fixes https://savannah.gnu.org/bugs/?48157.
2016-06-07 19:52:23 +02:00
Benno Schulenberg 83b89a49ef text: remove a redundant undo element
Implement its single use case by making better use of another element.
2016-06-07 19:23:51 +02:00
Benno Schulenberg 87a254400e text: remove a pointless setting of an undo element; it is never used 2016-06-07 19:23:51 +02:00
Benno Schulenberg 9192b7fe8c text: add an undo item before starting to comment or uncomment lines
By moving the test for the only situation where do_comment() does nothing
(when only the magic line is selected) further up front, the add_undo()
can be called before the commenting/uncommenting starts and two variables
and an extra function are made unnecessary.
2016-06-07 11:08:06 +02:00
Benno Schulenberg 5dee9fb2c6 files: it is fine to "change" the name of a nameless buffer
This fixes https://savannah.gnu.org/bugs/?48156.
2016-06-07 10:15:25 +02:00
Benno Schulenberg f0c65bc988 tweaks: add come comments and rename a variable 2016-06-06 20:29:53 +02:00
Benno Schulenberg 5f4d759679 tweaks: fix compilation when configured with --enable-tiny
Reported-by: Mike Scalora <mike@scalora.org>
2016-06-06 19:57:51 +02:00
Benno Schulenberg ec7b20eec6 syntax: don't call getcwd() with a NULL pointer
Some platforms don't like that.
2016-06-04 12:02:49 +02:00
Benno Schulenberg edf230b7df text: store the new file size in the undo item also when joining lines
This fixes https://savannah.gnu.org/bugs/?48099 reported by Mike Scalora.
2016-06-04 11:39:59 +02:00
Benno Schulenberg 0eefd2c326 README.GIT: reformat the text a bit 2016-06-04 11:27:15 +02:00
Benno Schulenberg f390eb8da0 docs: mention that pkg-config is needed when building from git 2016-06-04 11:20:29 +02:00
Benno Schulenberg 9f4b4c975a files: prevent dereferencing a possible (although very unlikely) NULL
Don't catch the NULL earlier, because we do want an error message when
opening the lockfile fails.
2016-06-04 11:18:29 +02:00