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
54a92614
Commit
54a92614
authored
7 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: group all movement routines in corresponding pairs
parent
86e71fa0
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
+19
-19
src/move.c
src/proto.h
+4
-4
src/proto.h
with
23 additions
and
23 deletions
+23
-23
src/move.c
View file @
54a92614
...
...
@@ -149,12 +149,6 @@ void do_para_begin(bool update_screen)
edit_redraw
(
was_current
,
CENTERING
);
}
/* Move up to first start of a paragraph before the current line. */
void
do_para_begin_void
(
void
)
{
do_para_begin
(
TRUE
);
}
/* 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 update_screen is TRUE, update the
...
...
@@ -185,6 +179,12 @@ void do_para_end(bool update_screen)
edit_redraw
(
was_current
,
CENTERING
);
}
/* Move up to first start of a paragraph before the current line. */
void
do_para_begin_void
(
void
)
{
do_para_begin
(
TRUE
);
}
/* Move down to just after the first end of a paragraph. */
void
do_para_end_void
(
void
)
{
...
...
@@ -276,13 +276,6 @@ void do_prev_word(bool allow_punct, bool update_screen)
edit_redraw
(
was_current
,
FLOWING
);
}
/* Move to the previous word in the file, treating punctuation as part of a
* word if the WORD_BOUNDS flag is set, and update the screen afterwards. */
void
do_prev_word_void
(
void
)
{
do_prev_word
(
ISSET
(
WORD_BOUNDS
),
TRUE
);
}
/* Move to the next word in the file. If allow_punct is TRUE, treat
* 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
...
...
@@ -326,6 +319,13 @@ bool do_next_word(bool allow_punct, bool update_screen)
return
started_on_word
;
}
/* Move to the previous word in the file, treating punctuation as part of a
* word if the WORD_BOUNDS flag is set, and update the screen afterwards. */
void
do_prev_word_void
(
void
)
{
do_prev_word
(
ISSET
(
WORD_BOUNDS
),
TRUE
);
}
/* Move to the next word in the file, treating punctuation as part of a word
* if the WORD_BOUNDS flag is set, and update the screen afterwards. */
void
do_next_word_void
(
void
)
...
...
@@ -486,12 +486,6 @@ void do_up(bool scroll_only)
}
}
/* Move up one line or chunk. */
void
do_up_void
(
void
)
{
do_up
(
FALSE
);
}
/* Move the cursor to next line or chunk. If scroll_only is TRUE, also
* scroll the screen one row, so the cursor stays in the same spot. */
void
do_down
(
bool
scroll_only
)
...
...
@@ -530,6 +524,12 @@ void do_down(bool scroll_only)
}
}
/* Move up one line or chunk. */
void
do_up_void
(
void
)
{
do_up
(
FALSE
);
}
/* Move down one line or chunk. */
void
do_down_void
(
void
)
{
...
...
This diff is collapsed.
Click to expand it.
src/proto.h
View file @
54a92614
...
...
@@ -357,28 +357,28 @@ size_t help_line_len(const char *ptr);
#endif
void
do_help_void
(
void
);
/*
All
functions in move.c. */
/*
Most
functions in move.c. */
void
do_first_line
(
void
);
void
do_last_line
(
void
);
void
do_page_up
(
void
);
void
do_page_down
(
void
);
#ifndef DISABLE_JUSTIFY
void
do_para_begin
(
bool
update_screen
);
void
do_para_begin_void
(
void
);
void
do_para_end
(
bool
update_screen
);
void
do_para_begin_void
(
void
);
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
update_screen
);
void
do_prev_word_void
(
void
);
bool
do_next_word
(
bool
allow_punct
,
bool
update_screen
);
void
do_prev_word_void
(
void
);
void
do_next_word_void
(
void
);
void
do_home
(
void
);
void
do_end
(
void
);
void
do_up
(
bool
scroll_only
);
void
do_up_void
(
void
);
void
do_down
(
bool
scroll_only
);
void
do_up_void
(
void
);
void
do_down_void
(
void
);
#ifndef NANO_TINY
void
do_scroll_up
(
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