Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cs24-19fa
git_rec_nano
Commits
83c26493
Commit
83c26493
authored
7 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: move a bunch of comments to the lines that they refer to
parent
d48f3e5e
master
feature/match-parens
refactor/readbility
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/winio.c
+16
-32
src/winio.c
with
16 additions
and
32 deletions
+16
-32
src/winio.c
View file @
83c26493
...
...
@@ -625,21 +625,18 @@ int parse_kbinput(WINDOW *win)
#endif
switch
(
retval
)
{
#ifdef KEY_SLEFT
/* Slang doesn't support KEY_SLEFT. */
#ifdef KEY_SLEFT
/* Slang doesn't support KEY_SLEFT. */
case
KEY_SLEFT
:
shift_held
=
TRUE
;
return
KEY_LEFT
;
#endif
#ifdef KEY_SRIGHT
/* Slang doesn't support KEY_SRIGHT. */
#ifdef KEY_SRIGHT
/* Slang doesn't support KEY_SRIGHT. */
case
KEY_SRIGHT
:
shift_held
=
TRUE
;
return
KEY_RIGHT
;
#endif
#ifdef KEY_SR
#ifdef KEY_SUP
/* ncurses and Slang don't support KEY_SUP. */
#ifdef KEY_SUP
/* ncurses and Slang don't support KEY_SUP. */
case
KEY_SUP
:
#endif
case
KEY_SR
:
/* Scroll backward, on Xfce4-terminal. */
...
...
@@ -647,24 +644,21 @@ int parse_kbinput(WINDOW *win)
return
KEY_UP
;
#endif
#ifdef KEY_SF
#ifdef KEY_SDOWN
/* ncurses and Slang don't support KEY_SDOWN. */
#ifdef KEY_SDOWN
/* ncurses and Slang don't support KEY_SDOWN. */
case
KEY_SDOWN
:
#endif
case
KEY_SF
:
/* Scroll forward, on Xfce4-terminal. */
shift_held
=
TRUE
;
return
KEY_DOWN
;
#endif
#ifdef KEY_SHOME
/* HP-UX 10-11 and Slang don't support KEY_SHOME. */
#ifdef KEY_SHOME
/* HP-UX 10-11 and Slang don't support KEY_SHOME. */
case
KEY_SHOME
:
#endif
case
SHIFT_HOME
:
shift_held
=
TRUE
;
case
KEY_A1
:
/* Home (7) on keypad with NumLock off. */
return
KEY_HOME
;
#ifdef KEY_SEND
/* HP-UX 10-11 and Slang don't support KEY_SEND. */
#ifdef KEY_SEND
/* HP-UX 10-11 and Slang don't support KEY_SEND. */
case
KEY_SEND
:
#endif
case
SHIFT_END
:
...
...
@@ -689,8 +683,7 @@ int parse_kbinput(WINDOW *win)
#endif
case
KEY_C3
:
/* PageDown (3) on keypad with NumLock off. */
return
KEY_NPAGE
;
#ifdef KEY_SDC
/* Slang doesn't support KEY_SDC. */
#ifdef KEY_SDC
/* Slang doesn't support KEY_SDC. */
case
KEY_SDC
:
#endif
case
DEL_CODE
:
...
...
@@ -698,41 +691,33 @@ int parse_kbinput(WINDOW *win)
return
the_code_for
(
do_delete
,
KEY_DC
);
else
return
KEY_BACKSPACE
;
#ifdef KEY_SIC
/* Slang doesn't support KEY_SIC. */
#ifdef KEY_SIC
/* Slang doesn't support KEY_SIC. */
case
KEY_SIC
:
return
the_code_for
(
do_insertfile_void
,
KEY_IC
);
#endif
#ifdef KEY_SBEG
/* Slang doesn't support KEY_SBEG. */
#ifdef KEY_SBEG
/* Slang doesn't support KEY_SBEG. */
case
KEY_SBEG
:
#endif
#ifdef KEY_BEG
/* Slang doesn't support KEY_BEG. */
#ifdef KEY_BEG
/* Slang doesn't support KEY_BEG. */
case
KEY_BEG
:
#endif
case
KEY_B2
:
/* Center (5) on keypad with NumLock off. */
return
ERR
;
#ifdef KEY_CANCEL
#ifdef KEY_SCANCEL
/* Slang doesn't support KEY_SCANCEL. */
#ifdef KEY_CANCEL
/* Slang doesn't support KEY_CANCEL. */
#ifdef KEY_SCANCEL
/* Slang doesn't support KEY_SCANCEL. */
case
KEY_SCANCEL
:
#endif
/* Slang doesn't support KEY_CANCEL. */
case
KEY_CANCEL
:
return
the_code_for
(
do_cancel
,
0x03
);
#endif
#ifdef KEY_SUSPEND
#ifdef KEY_SSUSPEND
/* Slang doesn't support KEY_SSUSPEND. */
#ifdef KEY_SUSPEND
/* Slang doesn't support KEY_SUSPEND. */
#ifdef KEY_SSUSPEND
/* Slang doesn't support KEY_SSUSPEND. */
case
KEY_SSUSPEND
:
#endif
/* Slang doesn't support KEY_SUSPEND. */
case
KEY_SUSPEND
:
return
the_code_for
(
do_suspend_void
,
KEY_SUSPEND
);
#endif
#ifdef KEY_BTAB
/* Slang doesn't support KEY_BTAB. */
#ifdef KEY_BTAB
/* Slang doesn't support KEY_BTAB. */
case
KEY_BTAB
:
return
SHIFT_TAB
;
#endif
...
...
@@ -745,8 +730,7 @@ int parse_kbinput(WINDOW *win)
case
KEY_ALT_R
:
return
ERR
;
#endif
#ifdef KEY_RESIZE
/* Slang and SunOS 5.7-5.9 don't support KEY_RESIZE. */
#ifdef KEY_RESIZE
/* Slang and SunOS 5.7-5.9 don't support KEY_RESIZE. */
case
KEY_RESIZE
:
#endif
#if defined(USE_SLANG) && defined(ENABLE_UTF8)
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help