Skip to content

Commit 29e16c7

Browse files
style: Fix line wrapping and indentation in zsvsheet_move_hor
Co-Authored-By: Matt Wong <matt@liquidaty.com>
1 parent 6303314 commit 29e16c7

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

app/sheet.c

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -259,12 +259,15 @@ static zsvsheet_status zsvsheet_move_hor(struct zsvsheet_display_info *di, bool
259259
struct zsvsheet_ui_buffer *current_ui_buffer = *(di->ui_buffers.current);
260260

261261
if (right) {
262-
cursor_right(di->dimensions->columns, zsvsheet_cell_display_width(current_ui_buffer, di->dimensions),
263-
current_ui_buffer->dimensions.col_count + (current_ui_buffer->dimensions.rownum_col_offset ? 1 : 0) >
264-
zsvsheet_screen_buffer_cols(current_ui_buffer->buffer)
265-
? zsvsheet_screen_buffer_cols(current_ui_buffer->buffer)
266-
: current_ui_buffer->dimensions.col_count + (current_ui_buffer->dimensions.rownum_col_offset ? 1 : 0),
267-
&current_ui_buffer->cursor_col, &current_ui_buffer->buff_offset.col);
262+
if (cursor_right(di->dimensions->columns, zsvsheet_cell_display_width(current_ui_buffer, di->dimensions),
263+
current_ui_buffer->dimensions.col_count +
264+
(current_ui_buffer->dimensions.rownum_col_offset ? 1 : 0) >
265+
zsvsheet_screen_buffer_cols(current_ui_buffer->buffer)
266+
? zsvsheet_screen_buffer_cols(current_ui_buffer->buffer)
267+
: current_ui_buffer->dimensions.col_count +
268+
(current_ui_buffer->dimensions.rownum_col_offset ? 1 : 0),
269+
&current_ui_buffer->cursor_col, &current_ui_buffer->buff_offset.col) > 0)
270+
;
268271
} else {
269272
if (current_ui_buffer->cursor_col > 0) {
270273
current_ui_buffer->cursor_col--;

0 commit comments

Comments
 (0)