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
5a3de7f1
Commit
5a3de7f1
authored
8 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: avoid an empty function call in tiny version with line numbers
parent
7b5cc1dc
master
feature/match-parens
refactor/readbility
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/nano.c
+2
-1
src/nano.c
src/proto.h
+2
-0
src/proto.h
src/winio.c
+2
-2
src/winio.c
with
6 additions
and
3 deletions
+6
-3
src/nano.c
View file @
5a3de7f1
...
...
@@ -2637,9 +2637,10 @@ int main(int argc, char **argv)
margin
=
needed_margin
;
editwincols
=
COLS
-
margin
;
#ifndef NANO_TINY
/* Ensure that firstcolumn is the starting column of its chunk. */
ensure_firstcolumn_is_aligned
();
#endif
/* The margin has changed -- schedule a full refresh. */
refresh_needed
=
TRUE
;
}
...
...
This diff is collapsed.
Click to expand it.
src/proto.h
View file @
5a3de7f1
...
...
@@ -662,7 +662,9 @@ int go_back_chunks(int nrows, filestruct **line, size_t *leftedge);
int
go_forward_chunks
(
int
nrows
,
filestruct
**
line
,
size_t
*
leftedge
);
bool
less_than_a_screenful
(
size_t
was_lineno
,
size_t
was_leftedge
);
void
edit_scroll
(
scroll_dir
direction
,
int
nrows
);
#ifndef NANO_TINY
void
ensure_firstcolumn_is_aligned
(
void
);
#endif
void
edit_redraw
(
filestruct
*
old_current
);
void
edit_refresh
(
void
);
void
adjust_viewport
(
update_type
location
);
...
...
This diff is collapsed.
Click to expand it.
src/winio.c
View file @
5a3de7f1
...
...
@@ -2951,19 +2951,19 @@ void edit_scroll(scroll_dir direction, int nrows)
}
}
#ifndef NANO_TINY
/* Ensure that firstcolumn is at the starting column of the softwrapped chunk
* it's on. We need to do this when the number of columns of the edit window
* has changed, because then the width of softwrapped chunks has changed. */
void
ensure_firstcolumn_is_aligned
(
void
)
{
#ifndef NANO_TINY
if
(
openfile
->
firstcolumn
%
editwincols
!=
0
)
openfile
->
firstcolumn
-=
(
openfile
->
firstcolumn
%
editwincols
);
/* If smooth scrolling is on, make sure the viewport doesn't center. */
focusing
=
FALSE
;
#endif
}
#endif
/* Return TRUE if current[current_x] is above the top of the screen, and FALSE
* otherwise. */
...
...
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