diff --git a/src/nvim/terminal.c b/src/nvim/terminal.c index 295fd36241..86e3944729 100644 --- a/src/nvim/terminal.c +++ b/src/nvim/terminal.c @@ -832,8 +832,6 @@ bool terminal_enter(void) static void terminal_check_cursor(void) { Terminal *term = curbuf->terminal; - curwin->w_wrow = term->cursor.row; - curwin->w_wcol = term->cursor.col + win_col_off(curwin); curwin->w_cursor.lnum = MIN(curbuf->b_ml.ml_line_count, row_to_linenr(term, term->cursor.row)); const linenr_T topline = MAX(curbuf->b_ml.ml_line_count - curwin->w_view_height + 1, 1); diff --git a/test/functional/terminal/window_spec.lua b/test/functional/terminal/window_spec.lua index c9bab695ea..974bedb0fd 100644 --- a/test/functional/terminal/window_spec.lua +++ b/test/functional/terminal/window_spec.lua @@ -495,13 +495,12 @@ describe(':terminal window', function() {1:-- TERMINAL --} | ]]) command('tabprevious') - -- TODO(seandewar): w_wrow's wrong if the terminal doesn't match the window size... screen:expect([[ {1: }{5:2}{1: foo }{2: foo }{4: }{2:X}| {19:r}ows: 5, cols: 25 │rows: 5, cols: 25 | rows: 5, cols: 50 │rows: 5, cols: 50 | - {19: } │ | {19: } │^ | + {19: } │ | {18:foo [-] }{17:foo [-] }| {1:-- TERMINAL --} | ]]) @@ -510,8 +509,8 @@ describe(':terminal window', function() {1: }{5:2}{1: foo }{2: foo }{4: }{2:X}| {19:r}ows: 5, cols: 25 │rows: 5, cols: 25 | rows: 5, cols: 50 │rows: 5, cols: 50 | - {19: } │{12: }| - {19: } │^ | + {19: } │{12:^ }| + {19: } │ | {18:foo [-] }{17:foo [-] }| | ]]) @@ -533,8 +532,8 @@ describe(':terminal window', function() {1: }{5:2}{1: foo }{2: foo }{4: }{2:X}| {19:r}ows: 5, cols: 25 │rows: 5, cols: 25 | rows: 5, cols: 50 │rows: 5, cols: 50 | - {19: } │ | {19: } │^ | + {19: } │ | {18:foo [-] }{17:foo [-] }| {1:-- TERMINAL --} | ]]) @@ -566,8 +565,8 @@ describe(':terminal window', function() {1: }{5:2}{1: foo }{2: foo }{4: }{2:X}| │rows: 5, cols: 25 | {6:~ }│rows: 5, cols: 50 | - {6:~ }│ | {6:~ }│^ | + {6:~ }│ | {4:[No Name] }{17:foo [-] }| {1:-- TERMINAL --} | ]])