Commit Graph

5754 Commits

Author SHA1 Message Date
Benno Schulenberg
d12fdda15b tweaks: replace a three-case switch with an if and an else 2016-07-31 18:10:01 +02:00
Benno Schulenberg
3930a697e8 tweaks: consistently use a parameter instead of a struct element 2016-07-30 13:05:52 +02:00
Benno Schulenberg
9322e1e6a4 tweaks: reshuffle two ifs for a little more speed
Saving roughly twenty microseconds at startup.
2016-07-30 13:04:06 +02:00
Benno Schulenberg
b70fe38eab tweaks: normalize some indentation 2016-07-30 12:24:35 +02:00
Benno Schulenberg
1c528db8da tweaks: condense three asserts into a single one
Also, when a key string does not denote a Ctrl nor Meta nor Function key,
there is no point in assigning a keycode, because plain characters cannot
be used as a function shortcut.
2016-07-30 12:24:35 +02:00
Benno Schulenberg
1c9ab8bf16 tweaks: rename a struct element, to be more fitting
The keycode is not a sequence; it is a single integer value.
2016-07-30 12:24:35 +02:00
Benno Schulenberg
e295070193 shortcuts: group the setting of key string and keycode into one function
And instead of using two key types, just use a bool to indicate whether
a keystroke involves Meta.
2016-07-30 12:21:42 +02:00
Benno Schulenberg
91951ab22a input: don't bother putting a keycode into byte range
A keycode is either already in byte range (so there is nothing to do)
or it is not and it shouldn't be (so there is nothing to do either).
2016-07-30 12:19:47 +02:00
Benno Schulenberg
5b0ab8be62 shortcuts: remove any unnecessary classifying of keys
After initialization, the type of a key is never used nor needed
(other than for meta keys).
2016-07-30 12:13:47 +02:00
Benno Schulenberg
ecef093def tweaks: adjust indentation after previous changes 2016-07-29 09:33:28 +02:00
Benno Schulenberg
6d6f5bd4a7 tweaks: check earlier on for sufficient length of the sequence 2016-07-29 09:33:28 +02:00
Benno Schulenberg
e3dbffc9f7 input: be more strict in recognizing certain escape sequences
Accept the "Esc [ 1 n ~" and "Esc [ 2 n ~" sequences only when they
end with the "~" character, not with any character.
2016-07-29 09:33:28 +02:00
Benno Schulenberg
2225d54126 input: don't use a function call when a literal value will do 2016-07-29 09:33:28 +02:00
Benno Schulenberg
9115828e76 input: fix a pasto from eight years ago, from commit e347efb 2016-07-29 09:33:16 +02:00
Benno Schulenberg
b43a72471a docs: tweak some spacing and spelling 2016-07-29 09:05:40 +02:00
Benno Schulenberg
2b5d29b8c6 po: update translations and regenerate POT file and PO files 2016-07-28 09:38:30 +02:00
Benno Schulenberg
b40520b574 bump version numbers and add a news item for 2.6.2 2016-07-28 09:21:27 +02:00
Benno Schulenberg
992533b91e moving: don't do an automatic smart home with Ctrl+Up and Ctrl+Down
It is nicer to have a predictable cursor position and not see it hop
left and right on differently indented lines.
2016-07-28 09:09:51 +02:00
Benno Schulenberg
f3e8991206 credits: don't bother blanking the second line nor the help lines
Those lines don't exist in that mode -- the relevant subwindows are
smaller, or have been made smaller just before.
2016-07-27 12:40:11 +02:00
Benno Schulenberg
df7353b312 tweaks: compute the sizes of the subwindows in a more direct manner 2016-07-27 12:27:04 +02:00
Benno Schulenberg
f311c0af87 tweaks: adjust a couple of comments 2016-07-27 09:23:49 +02:00
Benno Schulenberg
c88fae3310 search: match a beginning-of-line anchor just once per line
This fixes https://savannah.gnu.org/bugs/?48635.
2016-07-27 09:04:06 +02:00
Benno Schulenberg
68cfb08888 tweaks: fix compilation with --enable-tiny 2016-07-25 17:29:24 +02:00
Benno Schulenberg
4cff67fdde tweaks: adjust indentation after the previous change, and edit comments 2016-07-25 12:50:03 +02:00
Benno Schulenberg
aefe26d216 tweaks: factor out a common condition 2016-07-25 12:31:40 +02:00
Benno Schulenberg
8eb99e2a1d tweaks: put similar things together 2016-07-25 12:18:40 +02:00
Benno Schulenberg
19b6f906cc tweaks: rename another variable, for aptness 2016-07-25 10:57:33 +02:00
Benno Schulenberg
c38ffdc741 tweaks: rename two variables, to match others 2016-07-25 10:53:49 +02:00
Benno Schulenberg
a472f480a7 tweaks: trim some comments, and simplify a condition 2016-07-24 13:44:16 +02:00
Benno Schulenberg
4416d9c941 tweaks: shuffle the resetting of a counter to the tail of the routine 2016-07-24 13:15:45 +02:00
Benno Schulenberg
c073c5ae54 tweaks: don't bother resetting the Unicode code holder
It will be initialized when a new code is started.
2016-07-24 13:09:24 +02:00
David Lawrence Ramsey
fc0ddab349 input: provide feedback on the Unicode digits typed so far
This fulfills https://savannah.gnu.org/bugs/?48154.
2016-07-24 12:19:42 +02:00
Benno Schulenberg
c6dbcf91c3 new feature: functions to jump to previous or following block of text
And hard-bind the keys Ctrl+Up and Ctrl+Down to these functions.

Unlike the paragraph-jumping code, these new functions disregard
any indentation, treating only blank lines as separators.  They
also do an automatic smart home when that option is set.

This fulfills https://savannah.gnu.org/bugs/?48291.
2016-07-24 12:00:00 +02:00
Benno Schulenberg
8c7a38596d screen: include a workaround only when compiling against older ncurses
The bug with a leading wide character has been fixed since ncurses-5.9.

See https://savannah.gnu.org/bugs/?31743 for reference.
2016-07-24 10:38:31 +02:00
Benno Schulenberg
1c2d2a4027 tweaks: adjust a comment for removed definitions 2016-07-22 15:57:20 +02:00
Benno Schulenberg
1e5614b31b tweaks: avoid two compiler warnings 2016-07-22 15:48:06 +02:00
Benno Schulenberg
04b9b9c78b tweaks: avoid a runtime error when compiled with -fsanitize=undefined
This fixes https://savannah.gnu.org/bugs/?48540.
2016-07-22 15:39:45 +02:00
Benno Schulenberg
41ad376b70 chars: plug a gushing memory leak 2016-07-22 15:30:09 +02:00
Dirkjan Ochtman
1349c1d02c syntax: allow capital letters in Rust struct/trait names
Per https://doc.rust-lang.org/reference.html#fn2, non-ASCII characters are
currently not allowed in stable Rust, so keep it ASCII-only for now.

Signed-off-by: Dirkjan Ochtman <dirkjan@ochtman.nl>
2016-07-21 10:21:19 +02:00
Rishabh Dave
4c566c7903 tweaks: reduce the number of wattron/wattrof calls
Also, compose the coloring attributes during initialization
instead of every time when painting something.

Signed-off-by: Rishabh Dave <rishabhddave@gmail.com>
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-07-21 10:10:59 +02:00
Benno Schulenberg
73a07215cc debug: remove duplicate information 2016-07-21 09:54:07 +02:00
Benno Schulenberg
bf091be778 chars: don't try to see a character in an empty line
This fixes https://savannah.gnu.org/bugs/?48578.
2016-07-21 09:46:47 +02:00
Benno Schulenberg
103dd06347 input: don't crash when the window is resized during verbatim input
Instead of referring to a window that might have been deleted by a
resize, just turn the keypad back on for the two windows from which
input might have been requested.

Also: don't insert KEY_WINCH as the verbatim keystroke.

This fixes https://savannah.gnu.org/bugs/?48532.
2016-07-17 12:18:12 +02:00
Benno Schulenberg
1d4c1e0bfc input: plug a memory leak
This fixes https://savannah.gnu.org/bugs/?48538.
2016-07-17 12:00:33 +02:00
Benno Schulenberg
b3fbb7c7ff input: report keystroke M-[ as being unbindable instead of just unbound 2016-07-16 14:05:33 +02:00
Benno Schulenberg
225203d40d tweaks: correct a comment 2016-07-16 13:29:50 +02:00
Benno Schulenberg
c2a0c78d9b tweaks: rename a variable and a type, to be less confusing 2016-07-16 13:29:50 +02:00
Benno Schulenberg
97f4fe26f0 build-sys: ignore the revision header file 2016-07-16 13:29:13 +02:00
Benno Schulenberg
ef071255e5 color: refresh the screen whenever the active syntax changes
This fixes https://savannah.gnu.org/bugs/?47296.
2016-07-14 17:51:33 +02:00
Benno Schulenberg
afb6a5b86d color: forget about aborting the precalculation for multiline regexes
This fixes https://savannah.gnu.org/bugs/?48389.
2016-07-14 14:31:14 +02:00