tweaks: frob some parentheses and other things, to be more consistent
Этот коммит содержится в:
родитель
c7282e8821
Коммит
582a624998
10
src/move.c
10
src/move.c
@ -395,8 +395,8 @@ void do_home(bool be_clever)
|
||||
|
||||
openfile->placewewant = xplustabs();
|
||||
|
||||
/* If we changed chunk, we might be offscreen. Otherwise, update
|
||||
* current if the mark is on or we changed "page". */
|
||||
/* If we changed chunk, we might be offscreen. Otherwise,
|
||||
* update current if the mark is on or we changed "page". */
|
||||
if (ISSET(SOFTWRAP) && moved_off_chunk) {
|
||||
focusing = FALSE;
|
||||
edit_redraw(was_current);
|
||||
@ -426,8 +426,8 @@ void do_end(bool be_clever)
|
||||
((was_column / editwincols) * editwincols) +
|
||||
(editwincols - 1));
|
||||
|
||||
/* If already at the right edge of the screen, move fully to the
|
||||
* end of the line. Otherwise, move to the right edge. */
|
||||
/* If already at the right edge of the screen, move fully to
|
||||
* the end of the line. Otherwise, move to the right edge. */
|
||||
if (openfile->current_x == rightedge_x && be_clever)
|
||||
openfile->current_x = line_len;
|
||||
else {
|
||||
@ -587,7 +587,7 @@ void do_left(void)
|
||||
* we're now above the first line of the edit window, so scroll up. */
|
||||
if (ISSET(SOFTWRAP) && openfile->current_y == 0 &&
|
||||
openfile->current == was_current &&
|
||||
(openfile->placewewant / editwincols) != was_chunk) {
|
||||
openfile->placewewant / editwincols != was_chunk) {
|
||||
edit_scroll(UPWARD, ISSET(SMOOTH_SCROLL) ? 1 : editwinrows / 2 + 1);
|
||||
return;
|
||||
}
|
||||
|
@ -1891,11 +1891,11 @@ void do_output(char *output, size_t output_len, bool allow_cntrls)
|
||||
* changed, we need a full refresh. And if we were on the last line
|
||||
* of the edit window, and we moved one screen row, we're now below
|
||||
* the last line of the edit window, so we need a full refresh too. */
|
||||
if (ISSET(SOFTWRAP) && refresh_needed == FALSE)
|
||||
if ((strlenpt(openfile->current->data) / editwincols) != orig_rows ||
|
||||
if (ISSET(SOFTWRAP) && refresh_needed == FALSE &&
|
||||
(strlenpt(openfile->current->data) / editwincols != orig_rows ||
|
||||
(openfile->current_y == editwinrows - 1 &&
|
||||
xplustabs() / editwincols != original_row))
|
||||
refresh_needed = TRUE;
|
||||
xplustabs() / editwincols != original_row)))
|
||||
refresh_needed = TRUE;
|
||||
#endif
|
||||
|
||||
free(char_buf);
|
||||
|
@ -181,9 +181,9 @@ void do_deletion(undo_type action)
|
||||
#ifndef NANO_TINY
|
||||
/* If the number of screen rows that a softwrapped line occupies
|
||||
* has changed, we need a full refresh. */
|
||||
if (ISSET(SOFTWRAP) && refresh_needed == FALSE)
|
||||
if ((strlenpt(openfile->current->data) / editwincols) != orig_rows)
|
||||
refresh_needed = TRUE;
|
||||
if (ISSET(SOFTWRAP) && refresh_needed == FALSE &&
|
||||
strlenpt(openfile->current->data) / editwincols != orig_rows)
|
||||
refresh_needed = TRUE;
|
||||
#endif
|
||||
|
||||
set_modified();
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user