Commit Graph

6471 Commits (c68398f18f684761c48390d0fdee9a9c6502877b)

Author SHA1 Message Date
Benno Schulenberg c68398f18f syntax: php: color "static" again as "function", like it used to be 2017-05-21 10:11:42 +02:00
Benno Schulenberg d653aeab93 syntax: default: color also hash comments and email addresses 2017-05-19 21:09:15 +02:00
Benno Schulenberg 491e02f532 tweaks: reorder three items in the Info document 2017-05-19 21:09:02 +02:00
Benno Schulenberg f1a47a2aae tweaks: reshuffle a few things to reduce duplication
It is no longer necessary to assign up() and down() separately for
the help viewer because by now the movement keys have been sorted
in order of ascending stride also in the main menu.

The two string definitions are relocated just to reduce the number
of #ifdefs.
2017-05-19 17:57:39 +02:00
Benno Schulenberg 7b23878b42 tweaks: do actual screen refreshes in a single call, when possible 2017-05-19 16:31:08 +02:00
Benno Schulenberg 5cdadc3eb1 tweaks: avoid an unused-variable warning when using --disable-comment 2017-05-19 11:55:37 +02:00
Benno Schulenberg 8f89e23adb tweaks: adjust the indentation after the preceding change
Also, change two error messages a bit.
2017-05-19 11:47:13 +02:00
Benno Schulenberg 8302ff700b tweaks: remove the no-op x$disable tests 2017-05-19 11:47:13 +02:00
Benno Schulenberg a32d21c759 build: correct the inverted logic for the nanorc man page
All this "not is no" has me turning around in circles
at least ten times before I know which side is which.

This fixes https://savannah.gnu.org/bugs/?51061
Reported-by: Vicente Olivert Riera <vincent.riera@imgtec.com>
2017-05-19 11:46:18 +02:00
Benno Schulenberg f8214440c2 gnulib: update to its current state 2017-05-18 20:09:04 +02:00
Benno Schulenberg c1b08302df po: update translations and regenerate POT file and PO files 2017-05-18 14:27:00 +02:00
Benno Schulenberg afd8a4e804 bump version numbers and add a news item for the 2.8.3 release 2017-05-18 11:53:19 +02:00
Benno Schulenberg 88b740179a tweaks: rewrap a couple of old items in NEWS, and fix an article
Also fix a URL that mistaken points to a specific bug.
2017-05-18 11:02:16 +02:00
Benno Schulenberg 9ce41543ed startup: don't call delwin() with NULL, to avoid crashing on Solaris
Apparently the curses on SunOS is less forgiving than the one on GNU.
Or rather: delwin(NULL) should just return an error, it shouldn't crash.

This fixes https://savannah.gnu.org/bugs/?51053.
Reported-by: John Wiersba <jrw32982@yahoo.com>
Solved-by: John Wiersba <jrw32982@yahoo.com>
2017-05-18 10:26:11 +02:00
Benno Schulenberg e4775c2060 syntax: php: color also variable names, and color more reserved words
Most of the keywords listed on the following URL are now highlighted:
  http://php.net/manual/en/reserved.keywords.php

Also color single-quoted strings, and require that //-type comments
are preceded by whitespace or are alone on a line.

With-feedback-from: M <taur@mail.com>
2017-05-18 10:03:43 +02:00
Benno Schulenberg cd7c3483b4 build: for Solaris, tell the linker where to find clock_gettime()
This fixes https://savannah.gnu.org/bugs/?50972.
Reported-by: John Wiersba <jrw32982@yahoo.com>
2017-05-17 10:53:21 +02:00
Benno Schulenberg 8075e454a9 history: don't save the cursor position for temporary help files
It's useless, because the position doesn't get restored, and it
cannot be restored because the name is different every time.
2017-05-17 10:48:04 +02:00
Benno Schulenberg 93b1c1bea6 files: don't ask "save anyway" when user orders to discard the buffer
This extra question was included upon Chris' request, but I find it
confusing and angering.
2017-05-16 22:14:45 +02:00
Benno Schulenberg aa14526cb3 tweaks: exclude from the tiny version five error-betraying messages 2017-05-16 22:13:10 +02:00
Benno Schulenberg d29d49aece tweaks: remove an old fault-catching message 2017-05-16 20:09:03 +02:00
Benno Schulenberg e8f90789e9 tweaks: exclude from the tiny version two messages that will never occur 2017-05-16 20:00:42 +02:00
Benno Schulenberg c830b8f51c syntax: php: recognize also the .phtml and .php7 extensions
(And in the bargain sort or group some of the keywords.)

This addresses https://savannah.gnu.org/patch/?9342.
Suggested-by: M <taur@mail.com>
2017-05-15 10:57:57 +02:00
Benno Schulenberg 28beb3f9c5 replacing: don't let placewewant influence the placement of the cursor
When spotlighting the string to be replaced, placewewant isn't valid,
so tell place_the_cursor() to ignore its value to avoid the cursor
getting mistakenly placed at the beginning of the next row.

This fixes https://savannah.gnu.org/bugs/?50997.
Reported-by: David Lawrence Ramsey <pooka109@gmail.com>
2017-05-11 22:28:34 +02:00
Benno Schulenberg 08fd5b349b moving: limit the target column when it is beyond the last chunk
When the column given in gotoline() is beyond the last available
column in the row of the last chunk, then set placewewant to the
actual end of the chunk, to prevent surprising jumps to the left
when moving up or down from there.

This fixes https://savannah.gnu.org/bugs/?50995.
2017-05-11 21:00:37 +02:00
Benno Schulenberg 6971db773b tweaks: swap a comparison, to be clearer 2017-05-11 10:28:43 +02:00
Benno Schulenberg c620fc6aa9 build: use backticks to avoid a warning during autoreconf 2017-05-09 20:23:04 +02:00
Benno Schulenberg 7e09f2c64a syntax: makefile: color comments only at start of line or after whitespace 2017-05-09 17:37:05 +02:00
Benno Schulenberg 968c07fc81 build: use the "force" mechanism to always run the revision rule
Whenever 'make' is run, it should check whether the revision has
changed, and if so, it should update src/revision.h.

This portable FORCE mechanism should have been the replacement for
the phony target that was removed in a33a4f00, five commits ago.

This fixes https://savannah.gnu.org/bugs/?50956 in a better way.
2017-05-09 17:30:49 +02:00
Benno Schulenberg 858e75e4cf tweaks: transform the token DISABLE_NANORC to ENABLE_NANORC
Also, allow rebinding the word and block jumping functions
in the tiny version when nanorc files are reenabled.
2017-05-09 11:59:34 +02:00
Benno Schulenberg a05180ed2d tweaks: transform the token DISABLE_TABCOMP to ENABLE_TABCOMP 2017-05-09 11:31:54 +02:00
Benno Schulenberg 00533854c0 tweaks: fix compilation with --enable-tiny ...-help and ...-multibuffer
(This should have been part of 9ea5eef2, four commits ago.)
2017-05-08 22:01:34 +02:00
Benno Schulenberg dc3610fc8e tweaks: transform the token DISABLE_BROWSER to ENABLE_BROWSER
Also, allow Ctrl+Left/Right with --enable-tiny --enable-browser.
2017-05-08 21:56:50 +02:00
Benno Schulenberg a33a4f00e5 build: don't use a dummy dependency, as it breaks non-GNU makes
This fixes https://savannah.gnu.org/bugs/?50956.
Reported-by: John Wiersba <jrw32982@yahoo.com>
2017-05-08 21:27:07 +02:00
Benno Schulenberg 509b091c47 tweaks: rename three empty functions, and reshuffle some others
Also remove a superfluous check for 'do_replace' -- it never gets
bound in the Search/Replace menus.
2017-05-08 14:33:18 +02:00
Benno Schulenberg 9ea5eef200 bindings: allow toggling a new buffer when multiple buffers are enabled
When configured with --enable-tiny --enable-multibuffer,
/do/ include the new-buffer toggle in the Read-File menu.
2017-05-08 13:36:57 +02:00
Benno Schulenberg e701bb01aa tweaks: remove five dummy function definitions from the tiny version 2017-05-08 13:04:26 +02:00
Benno Schulenberg a3102cd4cf syntax: xml: recognize an XML file also by its first line
Some .rdf files are XML, but the .rdf extension seems to be used
also for other things.  So... use the 'header' mechanism.
2017-05-07 20:02:20 +02:00
Benno Schulenberg da67883508 syntax: nanohelp: color also ^6 as a shortcut keystroke
(Hadn't seen that one because of my additional bindings.)
2017-05-07 20:00:52 +02:00
David Lawrence Ramsey 03c3e2b7c0 tweaks: fix several whitespace irregularities
Add missing spaces, remove excess spaces, and
replace groups of indentation spaces with tabs.
2017-05-07 18:20:01 +02:00
Benno Schulenberg 4953dcec20 tweaks: add another warning for an impossible condition 2017-05-05 22:00:04 +02:00
Benno Schulenberg f5155786e1 tweaks: adjust whitespace and comments after the preceding change 2017-05-05 21:54:23 +02:00
Benno Schulenberg a9abc3d95f chars: optimize moving a character left in the non-UTF-8 case
When not in a UTF-8 locale, each character is just a single byte.
2017-05-05 21:40:00 +02:00
Benno Schulenberg 09cabcad5d chars: probe for a valid UTF-8 starter byte, instead of overstepping
Instead of always stepping back four bytes and then tentatively
moving forward again (which is wasteful when most codes are just
one or two bytes long), inspect the preceding bytes one by one
and begin the move forward at the first valid starter byte.

This reduces the backwards searching time by close to 40 percent.
2017-05-05 21:36:45 +02:00
Benno Schulenberg f162a6a2ab chars: valid UTF-8 codes are at most 4 bytes long, so look only that far
This reduces the backwards searching time by a good 20 percent.
2017-05-05 21:34:23 +02:00
Benno Schulenberg 5a3de7f117 tweaks: avoid an empty function call in tiny version with line numbers 2017-05-05 12:39:20 +02:00
Benno Schulenberg 7b5cc1dcda display: keep the cursor put, also when toggling nohelp or morespace
Also when toggling the help lines back on or the extra editing space
back off, keep the cursor near the bottom of the screen if it /was/
there, instead of centering it -- if smooth scrolling is on, that is.

This supplements the fix for https://savannah.gnu.org/bugs/?50933.
2017-05-05 12:37:45 +02:00
David Lawrence Ramsey 2b38547875 display: ensure smooth scrolling when the edit window is resized
When the editing space gets narrower, either by toggling line numbers on
or making nano's window smaller, and when the cursor is near the bottom,
it can be pushed offscreen.  In that case, don't get it back onscreen by
centering the current line but by putting it on the bottom row.  This
makes for a smoother experience.

This fixes http://savannah.gnu.org/bugs/?50933.
2017-05-05 12:31:02 +02:00
Benno Schulenberg 492166a3f7 po: update translations and regenerate POT file and PO files 2017-05-04 11:19:50 +02:00
Benno Schulenberg e1e15fd0f4 bump version numbers and add a news item for the 2.8.2 release 2017-05-04 10:24:54 +02:00
Benno Schulenberg 9c2bc68847 help: after a search, show the cursor only when something was found
And hide the cursor again as soon as the user scrolls.
Achieve this through making the 'didfind' variable global.

Also, remove a superfluous call of wnoutrefresh(), as bottombars()
already does that.

This fixes https://savannah.gnu.org/bugs/?50918.
Reported-by: David Lawrence Ramsey <pooka109@gmail.com>
2017-05-03 17:02:49 +02:00