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
2f9232a4
Commit
2f9232a4
authored
8 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: adjust indentation after previous change
parent
0d5fbfb9
master
feature/match-parens
refactor/readbility
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/prompt.c
+66
-69
src/prompt.c
with
66 additions
and
69 deletions
+66
-69
src/prompt.c
View file @
2f9232a4
...
...
@@ -33,10 +33,9 @@ static size_t statusbar_x = HIGHEST_POSITIVE;
static
size_t
statusbar_pww
=
HIGHEST_POSITIVE
;
/* The place we want in answer. */
/* Read in a character, interpret it as a shortcut or toggle if
* necessary, and return it.
* Set ran_func to TRUE if we ran a function associated with a
* shortcut key, and set finished to TRUE if we're done after running
/* Read in a keystroke, interpret it if it is a shortcut or toggle, and
* return it. Set ran_func to TRUE if we ran a function associated with
* a shortcut key, and set finished to TRUE if we're done after running
* or trying to run a function associated with a shortcut key.
* refresh_func is the function we will call to refresh the edit window. */
int
do_statusbar_input
(
bool
*
ran_func
,
bool
*
finished
,
...
...
@@ -103,12 +102,12 @@ int do_statusbar_input(bool *ran_func, bool *finished,
}
}
/* If we got a shortcut, or if there aren't any other
characters
*
waiting
after the one we read in, we need to
display
all the
*
characters in the
input buffer if
it isn't empty
. */
/* If we got a shortcut, or if there aren't any other
keystrokes waiting
* after the one we read in, we need to
insert
all the
characters in the
* input buffer
(
if
not empty) into the answer
. */
if
((
have_shortcut
||
get_key_buffer_len
()
==
0
)
&&
kbinput
!=
NULL
)
{
/* Display all the
characters in the input buffer at
* once, filtering out
control characters. */
/* Inject all
characters in the input buffer at
once, filtering out
*
control characters. */
do_statusbar_output
(
kbinput
,
kbinput_len
,
TRUE
,
NULL
);
/* Empty the input buffer. */
...
...
@@ -117,7 +116,6 @@ int do_statusbar_input(bool *ran_func, bool *finished,
kbinput
=
NULL
;
}
if
(
have_shortcut
)
{
if
(
s
->
scfunc
==
do_tab
||
s
->
scfunc
==
do_enter
)
;
...
...
@@ -160,18 +158,17 @@ int do_statusbar_input(bool *ran_func, bool *finished,
input
=
sc_seq_or
(
do_enter
,
0
);
*
finished
=
TRUE
;
}
}
else
if
(
s
->
scfunc
==
do_cut_text_void
)
{
}
else
if
(
s
->
scfunc
==
do_cut_text_void
)
do_statusbar_cut_text
();
}
else
if
(
s
->
scfunc
==
do_delete
)
{
else
if
(
s
->
scfunc
==
do_delete
)
do_statusbar_delete
();
}
else
if
(
s
->
scfunc
==
do_backspace
)
{
else
if
(
s
->
scfunc
==
do_backspace
)
do_statusbar_backspace
();
}
else
{
else
{
/* Handle any other shortcut in the current menu, setting
* ran_func to TRUE if we try to run their associated
* functions and setting finished to TRUE to indicate
* that we're done after running or trying to run their
* associated functions. */
* ran_func to TRUE if we try to run their associated functions,
* and setting finished to TRUE to indicatethat we're done after
* running or trying to run their associated functions. */
f
=
sctofunc
(
s
);
if
(
s
->
scfunc
!=
NULL
)
{
*
ran_func
=
TRUE
;
...
...
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