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
700c5c93
Commit
700c5c93
authored
7 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: rename a parameter, to be more imperative
parent
74f12885
master
feature/match-parens
refactor/readbility
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/move.c
+13
-16
src/move.c
src/proto.h
+4
-4
src/proto.h
with
17 additions
and
20 deletions
+17
-20
src/move.c
View file @
700c5c93
...
...
@@ -133,10 +133,9 @@ void do_page_down(void)
}
#ifndef DISABLE_JUSTIFY
/* Move up to the beginning of the last beginning-of-paragraph line
* before the current line. If allow_update is TRUE, update the screen
* afterwards. */
void
do_para_begin
(
bool
allow_update
)
/* Move to the beginning of the last beginning-of-paragraph line before the
* current line. If update_screen is TRUE, update the screen afterwards. */
void
do_para_begin
(
bool
update_screen
)
{
filestruct
*
was_current
=
openfile
->
current
;
...
...
@@ -148,7 +147,7 @@ void do_para_begin(bool allow_update)
openfile
->
current_x
=
0
;
if
(
allow_
update
)
if
(
update
_screen
)
edit_redraw
(
was_current
);
}
...
...
@@ -160,11 +159,11 @@ void do_para_begin_void(void)
/* Move down to the beginning of the last line of the current paragraph.
* Then move down one line farther if there is such a line, or to the
* end of the current line if not. If
allow_
update is TRUE, update the
* end of the current line if not. If update
_screen
is TRUE, update the
* screen afterwards. A line is the last line of a paragraph if it is
* in a paragraph, and the next line either is the beginning line of a
* paragraph or isn't in a paragraph. */
void
do_para_end
(
bool
allow_
update
)
void
do_para_end
(
bool
update
_screen
)
{
filestruct
*
was_current
=
openfile
->
current
;
...
...
@@ -184,7 +183,7 @@ void do_para_end(bool allow_update)
}
else
openfile
->
current_x
=
strlen
(
openfile
->
current
->
data
);
if
(
allow_
update
)
if
(
update
_screen
)
edit_redraw
(
was_current
);
}
...
...
@@ -236,9 +235,9 @@ void do_next_block(void)
}
/* Move to the previous word in the file. If allow_punct is TRUE, treat
* punctuation as part of a word. If
allow_
update is TRUE, update the
* punctuation as part of a word. If update
_screen
is TRUE, update the
* screen afterwards. */
void
do_prev_word
(
bool
allow_punct
,
bool
allow_
update
)
void
do_prev_word
(
bool
allow_punct
,
bool
update
_screen
)
{
filestruct
*
was_current
=
openfile
->
current
;
bool
seen_a_word
=
FALSE
,
step_forward
=
FALSE
;
...
...
@@ -275,8 +274,7 @@ void do_prev_word(bool allow_punct, bool allow_update)
openfile
->
current_x
=
move_mbright
(
openfile
->
current
->
data
,
openfile
->
current_x
);
/* If allow_update is TRUE, update the screen. */
if
(
allow_update
)
{
if
(
update_screen
)
{
focusing
=
FALSE
;
edit_redraw
(
was_current
);
}
...
...
@@ -290,10 +288,10 @@ void do_prev_word_void(void)
}
/* Move to the next word in the file. If allow_punct is TRUE, treat
* punctuation as part of a word. If
allow_
update is TRUE, update the
* punctuation as part of a word. If update
_screen
is TRUE, update the
* screen afterwards. Return TRUE if we started on a word, and FALSE
* otherwise. */
bool
do_next_word
(
bool
allow_punct
,
bool
allow_
update
)
bool
do_next_word
(
bool
allow_punct
,
bool
update
_screen
)
{
filestruct
*
was_current
=
openfile
->
current
;
bool
started_on_word
=
is_word_mbchar
(
openfile
->
current
->
data
+
...
...
@@ -325,8 +323,7 @@ bool do_next_word(bool allow_punct, bool allow_update)
break
;
}
/* If allow_update is TRUE, update the screen. */
if
(
allow_update
)
{
if
(
update_screen
)
{
focusing
=
FALSE
;
edit_redraw
(
was_current
);
}
...
...
This diff is collapsed.
Click to expand it.
src/proto.h
View file @
700c5c93
...
...
@@ -350,16 +350,16 @@ void do_last_line(void);
void
do_page_up
(
void
);
void
do_page_down
(
void
);
#ifndef DISABLE_JUSTIFY
void
do_para_begin
(
bool
allow_
update
);
void
do_para_begin
(
bool
update
_screen
);
void
do_para_begin_void
(
void
);
void
do_para_end
(
bool
allow_
update
);
void
do_para_end
(
bool
update
_screen
);
void
do_para_end_void
(
void
);
#endif
void
do_prev_block
(
void
);
void
do_next_block
(
void
);
void
do_prev_word
(
bool
allow_punct
,
bool
allow_
update
);
void
do_prev_word
(
bool
allow_punct
,
bool
update
_screen
);
void
do_prev_word_void
(
void
);
bool
do_next_word
(
bool
allow_punct
,
bool
allow_
update
);
bool
do_next_word
(
bool
allow_punct
,
bool
update
_screen
);
void
do_next_word_void
(
void
);
void
do_home
(
bool
be_clever
);
void
do_home_void
(
void
);
...
...
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