Benno Schulenberg
f3a441043d
display: where needed, use slow blanking, but elsewhere do it much faster
...
Where the row needs to be filled with spaces with the attributes that
were set (title bar, prompt bar, and browser highlight), use printw().
But when the row needs to be actually cleared, use the much faster
clrtoeol().
This reduces the time needed to clear a full row with 95 percent.
2019-06-25 11:12:27 +02:00
Benno Schulenberg
6dc8570d55
tweaks: reshuffle a few things, partly to make two chunks more alike
2019-05-30 16:00:11 +02:00
Benno Schulenberg
4f1eb5fdd4
tweaks: remove the two remaining handfuls of asserts
...
They are just clutter -- no one runs a debug build for any length
of time.
2019-05-19 18:58:02 +02:00
Benno Schulenberg
4fb9f298c9
tweaks: adjust some indentation after the previous change
...
Also reshuffle some arguments.
2019-05-08 19:35:42 +02:00
Benno Schulenberg
c338d86843
tweaks: rename some single-letter variables to the same significant word
...
And simply elide one of those variables.
2019-05-08 19:35:03 +02:00
Benno Schulenberg
00410d83fc
tweaks: rename a function, to be distinct and fitting
...
It was hard to remember that the "pt" stood for "plus tabs", and the
"len" seemed to say it was about number of bytes instead of columns.
2019-04-24 10:52:35 +02:00
David Lawrence Ramsey
f13dd140eb
display: correctly trim an overshooting character from a prompt answer
...
Tell display_string() explicitly when we're at a prompt, instead of
letting it glean this from the current menu not being MMAIN, which
fails in some circumstances.
This improves the fix for https://savannah.gnu.org/bugs/?55620 ,
fixes https://savannah.gnu.org/bugs/?55680 in a better way,
and fixes https://savannah.gnu.org/bugs/?55773 .
2019-02-28 19:47:55 +01:00
Benno Schulenberg
79ca3ceabf
copyright: update the years for the FSF
2019-02-24 19:35:56 +01:00
Benno Schulenberg
72a49dbbb4
browser, help: make <Bsp> page up also when terminfo mismatches terminal
2018-12-28 17:20:24 +01:00
Benno Schulenberg
0946153b47
tweaks: hard-bind ASCII DEL in a slightly more economical way
...
And in the bargain get rid of a duplicate help-text entry for
either "Del" or "Bsp".
2018-12-28 17:20:18 +01:00
Benno Schulenberg
4bd423fc92
tweaks: reorder some code to put backward motion before the forward one
2018-11-07 20:48:04 +01:00
Benno Schulenberg
03d10941cc
bindings: recognize ASCII DEL as backspace also in viewer and browser
...
This completes the fix for https://savannah.gnu.org/bugs/?54978 .
Reported-by: David Lawrence Ramsey <pooka109@gmail.com>
2018-11-07 20:18:39 +01:00
David Lawrence Ramsey
9c8e40b442
bindings: make "n" work again in file browser and help viewer
...
Also, "N" shouldn't be a synonym of "n" in tiny mode.
2018-07-29 20:49:56 +02:00
David Lawrence Ramsey
7a31507167
bindings: make ^Q start a backward search also in the file browser
...
This makes the four search keystrokes (^W/^Q/M-W/M-Q) available in
all three areas of nano: editor, help viewer, and file browser.
2018-07-29 11:43:13 +02:00
Benno Schulenberg
7f2031006a
bindings: make ^Q and M-Q available also in the help viewer
...
As the help viewer is almost a normal buffer, commands that make sense
-- like searching backwards, and searching the previous occurrence --
should work in the help viewer too.
In addition, show all Search commands prominently in the help lines of
the help viewer, so that users are likely to notice them and will maybe
infer that they work in the editor itself too.
This fixes https://savannah.gnu.org/bugs/?54368 .
With-help-from: David Lawrence Ramsey <pooka109@gmail.com>
2018-07-29 11:43:13 +02:00
Benno Schulenberg
cecf453b14
tweaks: use symbolic names instead of puzzling TRUE and FALSE
2018-05-10 18:19:12 +02:00
Benno Schulenberg
c3a02f8094
tweaks: rename two variables, to be more descriptive
2018-05-10 18:11:35 +02:00
Benno Schulenberg
87283711ee
tweaks: improve a couple of comments
2018-05-10 18:10:23 +02:00
Benno Schulenberg
30fc197b66
tweaks: adjust a couple of types, to reduce the number of warnings
...
This avoids eleven warnings of the kind "comparison between signed
and unsigned integer expressions [-Wsign-compare]".
2018-03-22 19:33:22 +01:00
David Lawrence Ramsey
7b1f3f4fe7
tweaks: correct several parameter types
...
This avoids a bunch of warnings when compiled with -pedantic:
ISO C forbids comparison of ‘void *’ with function pointer
2018-03-18 20:01:25 +01:00
Benno Schulenberg
dcda98fb73
tweaks: remove an inconsistent space from two pointer declarations
...
Reported-by: Brand Huntsman <alpha@qzx.com>
2018-03-17 15:53:22 +01:00
Benno Schulenberg
93318b972d
tweaks: elide two parameters and thus a pair of wrapper functions
...
When just scrolling and the cursor does not need to change position
(that is: it is not on the first or last row of the edit window),
then edit_scroll() has handled everything and there is no need to
additionally redraw anything or update 'placewewant'.
2018-03-17 14:07:42 +01:00
Benno Schulenberg
bdd8920081
bindings: make a key defined as string work also in browser and viewer
2018-03-01 10:55:04 +01:00
Benno Schulenberg
f5c87a7fee
tweaks: swap the row and col parameters to a more consistent order
2018-01-27 20:00:14 +01:00
Benno Schulenberg
f72fecee9b
copyright: update the years for the FSF
...
And one for me, for the much changed keyboard stuff.
2018-01-24 10:14:43 +01:00
Benno Schulenberg
17429d7f38
tweaks: fix some whitespace errors, and convert alignment tabs to spaces
2017-12-29 21:35:14 +01:00
Benno Schulenberg
87206c0607
tweaks: convert the indentation to use only tabs
...
Each leading tab is converted to two tabs, and any leading four spaces
is converted to one tab. The intended tab size (for keeping most lines
within 80 columns) is now four.
2017-12-29 20:06:50 +01:00
Benno Schulenberg
f9ebf038e0
tweaks: slightly rename four functions, for aptness and variety
2017-12-26 14:15:49 +01:00
Benno Schulenberg
5239e7c52b
copyright: update some years, and standardize on the dashed format
2017-11-12 10:46:20 +01:00
Benno Schulenberg
028d12f4fb
tweaks: transform the token DISABLE_OPERATINGDIR to ENABLE_OPERATINGDIR
2017-10-29 21:08:07 +01:00
Benno Schulenberg
ff35a61355
tweaks: transform the token DISABLE_HISTORIES to ENABLE_HISTORIES
2017-10-29 19:43:05 +01:00
Benno Schulenberg
3f27c312c4
tweaks: get rid of some cluttering conditional compilation
...
In the tiny version, do_prompt() will now have an extra NULL
parameter, which will cost maybe twenty extra bytes of code.
That is acceptable when it saves thirty lines in the source.
2017-10-29 11:39:27 +01:00
Benno Schulenberg
e1e6c5f612
bindings: make the search function rebindable again in help and browser
...
Adjust to the changed meaning of 'whereis': it is no longer do_search()
but do_search_forward().
Hinted-at-by: Brand Huntsman <alpha@qzx.com>
2017-10-18 20:55:09 +02:00
Benno Schulenberg
b27ab4f0a1
browser: place the cursor properly on the selected file when -g is used
...
Simply redraw the browser screen upon every keystroke when --showcursor
is in effect, to be certain that the cursor will be placed again at the
correct spot.
This fixes https://savannah.gnu.org/bugs/?52078
and fixes https://savannah.gnu.org/bugs/?52079 .
Reported-by: David Lawrence Ramsey <pooka109@gmail.com>
2017-09-22 21:52:41 +02:00
Benno Schulenberg
c74d2632bb
tweaks: make the switching on and off of the cursor a bit more compact
2017-09-22 21:31:01 +02:00
Benno Schulenberg
ae34825f58
display: rework the switching on and off of the cursor
...
The basic idea is that the cursor is always off, except when it needs
to be on: when waiting for text input, and in a few other cases: when
something was searched and found in the help viewer, and in the file
browser when option -g is in effect.
This fixes https://savannah.gnu.org/bugs/?51923 .
Reported-by: Mike Frysinger <vapier@gentoo.org>
2017-09-20 21:35:25 +02:00
Benno Schulenberg
a56a881c4b
browser: correct the inverted search behavior for Alt+Up/Alt+Down
...
This should have been added and amended in the previous commit --
my mistake.
2017-08-20 09:22:19 +02:00
David Lawrence Ramsey
633343de24
browser: allow backward/forward re-searches with Alt+Up/Alt+Down
...
Also bind 'N' to a backward re-search, while retaining 'n' for a
forward one, This matches the functionality in the help viewer.
2017-08-19 21:49:32 +02:00
Benno Schulenberg
ec20e3a7a8
tweaks: rename a function, to let it make more sense
...
Further, slightly reword an error message so it is appropriate also
when an out-of-bounds file is specified on the command line.
2017-08-13 10:08:50 +02:00
Benno Schulenberg
dd88842d5a
tweaks: elide the global variable 'full_operating_dir'
...
There is no need to retain the (relative) path that the user
specified, so we can simply reuse that variable.
2017-08-13 10:08:37 +02:00
Benno Schulenberg
11072ed587
tweaks: sort the includes, so it's a little easier to see what is there
2017-08-06 19:40:30 +02:00
David Lawrence Ramsey
1c1cbae6bc
small addition: allow customizing the color of selected text
...
The new option 'set selectedcolor' applies to marked text, to the
currently selected file in the file browser, and to the highlighted
match during interactive search-and-replace.
2017-08-06 09:30:32 +02:00
Benno Schulenberg
80686bb525
tweaks: remove includes that appear to be superfluous
...
Without them, nano still compiles for me, with everything enabled,
even when using --enable-debug, --enable-utf8, and --with-slang.
2017-08-06 09:08:30 +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
5033cfd81a
tweaks: transform the token DISABLE_MOUSE to ENABLE_MOUSE
...
Also, trim some comments and avoid an unused-variable warning.
2017-05-01 20:53:07 +02:00
Benno Schulenberg
46430999d5
build: make --enable-help properly depend on --enable-multibuffer
...
And in the process transform the token DISABLE_HELP to ENABLE_HELP.
2017-04-25 18:27:55 +02:00
Benno Schulenberg
ae15fc9bb2
bindings: allow using '/' to start a search in the help viewer
...
And allow 'N' for searching the next occurrence. Add the
same keystrokes to the file browser too, for consistency.
2017-04-25 17:21:38 +02:00
Benno Schulenberg
754c62c5cc
copyright: update the years, use ranges, and explain this usage
...
The interval 2013-2017 for the Free Software Foundation is valid
because in those years there were releases with changes by either
Chris or David, and the GNU maintainers guide advises to mention
a new year in all files of a package, not just in the ones that
actually changed, and be done with it for the rest of the year.
2017-04-09 12:09:23 +02:00
Benno Schulenberg
fb534bada6
bindings: make ^Up/^Down go to first/last row in the file browser
...
Making ^Up and ^Down go to top and bottom row in the file browser
complements and completes the behavior of ^Left and ^Right.
2017-04-04 20:26:21 +02:00
Benno Schulenberg
9e7e88e157
bindings: accept "q" and "x" to exit from help viewer and file browser
...
"Q" is a pretty standard key to exit from something, and "X" is fairly
mnemonic -- better than "E" at least.
2017-03-23 12:42:53 +01:00