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
83a841cd
Commit
83a841cd
authored
8 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: chuck some debugging stuff and some useless asserts
parent
0af5788a
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/move.c
+2
-24
src/move.c
with
2 additions
and
24 deletions
+2
-24
src/move.c
View file @
83a841cd
...
...
@@ -75,13 +75,8 @@ void do_page_up(void)
for
(
i
=
mustmove
;
i
-
skipped
>
0
&&
openfile
->
current
!=
openfile
->
fileage
;
i
--
)
{
openfile
->
current
=
openfile
->
current
->
prev
;
#ifndef NANO_TINY
if
(
ISSET
(
SOFTWRAP
)
&&
openfile
->
current
)
{
if
(
ISSET
(
SOFTWRAP
)
&&
openfile
->
current
)
skipped
+=
strlenpt
(
openfile
->
current
->
data
)
/
editwincols
;
#ifdef DEBUG
fprintf
(
stderr
,
"paging up: i = %d, skipped = %d based on line %ld len %lu
\n
"
,
i
,
skipped
,
(
long
)
openfile
->
current
->
lineno
,
(
unsigned
long
)
strlenpt
(
openfile
->
current
->
data
));
#endif
}
#endif
}
...
...
@@ -114,13 +109,8 @@ void do_page_down(void)
mustmove
=
(
maxlines
<
3
)
?
1
:
maxlines
-
2
;
for
(
i
=
mustmove
;
i
>
0
&&
openfile
->
current
!=
openfile
->
filebot
;
i
--
)
{
for
(
i
=
mustmove
;
i
>
0
&&
openfile
->
current
!=
openfile
->
filebot
;
i
--
)
openfile
->
current
=
openfile
->
current
->
next
;
#ifdef DEBUG
fprintf
(
stderr
,
"paging down: moving to line %lu
\n
"
,
(
unsigned
long
)
openfile
->
current
->
lineno
);
#endif
}
openfile
->
current_x
=
actual_x
(
openfile
->
current
->
data
,
openfile
->
placewewant
);
...
...
@@ -244,8 +234,6 @@ void do_prev_word(bool allow_punct, bool allow_update)
filestruct
*
was_current
=
openfile
->
current
;
bool
seen_a_word
=
FALSE
,
step_forward
=
FALSE
;
assert
(
openfile
->
current
!=
NULL
&&
openfile
->
current
->
data
!=
NULL
);
/* Move backward until we pass over the start of a word. */
while
(
TRUE
)
{
/* If at the head of a line, move to the end of the preceding one. */
...
...
@@ -303,8 +291,6 @@ bool do_next_word(bool allow_punct, bool allow_update)
openfile
->
current_x
,
allow_punct
);
bool
seen_space
=
!
started_on_word
;
assert
(
openfile
->
current
!=
NULL
&&
openfile
->
current
->
data
!=
NULL
);
/* Move forward until we reach the start of a word. */
while
(
TRUE
)
{
/* If at the end of a line, move to the beginning of the next one. */
...
...
@@ -413,8 +399,6 @@ void do_up(bool scroll_only)
(
scroll_only
&&
openfile
->
edittop
==
openfile
->
fileage
))
return
;
assert
(
ISSET
(
SOFTWRAP
)
||
openfile
->
current_y
==
openfile
->
current
->
lineno
-
openfile
->
edittop
->
lineno
);
/* Move the current line of the edit window up. */
openfile
->
current
=
openfile
->
current
->
prev
;
openfile
->
current_x
=
actual_x
(
openfile
->
current
->
data
,
...
...
@@ -458,10 +442,6 @@ void do_down(bool scroll_only)
if
(
openfile
->
current
==
openfile
->
filebot
)
return
;
assert
(
ISSET
(
SOFTWRAP
)
||
openfile
->
current_y
==
openfile
->
current
->
lineno
-
openfile
->
edittop
->
lineno
);
assert
(
openfile
->
current
->
next
!=
NULL
);
#ifndef NANO_TINY
if
(
ISSET
(
SOFTWRAP
))
{
/* Compute the number of lines to scroll. */
...
...
@@ -564,8 +544,6 @@ void do_right(void)
{
size_t
was_column
=
xplustabs
();
assert
(
openfile
->
current_x
<=
strlen
(
openfile
->
current
->
data
));
if
(
openfile
->
current
->
data
[
openfile
->
current_x
]
!=
'\0'
)
openfile
->
current_x
=
move_mbright
(
openfile
->
current
->
data
,
openfile
->
current_x
);
...
...
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