Mercurial > vim
comparison src/testdir/test_cursor_func.vim @ 31355:45a03dd92f28 v9.0.1011
patch 9.0.1011: ml_get error when using screenpos()
Commit: https://github.com/vim/vim/commit/99d19438cabaf13074229d9a32e3a4af9ce98744
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Dec 5 16:23:24 2022 +0000
patch 9.0.1011: ml_get error when using screenpos()
Problem: ml_get error when using screenpos().
Solution: Give an error for the line number. (closes https://github.com/vim/vim/issues/11661)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 05 Dec 2022 17:30:06 +0100 |
parents | 1a32f1a4f823 |
children | 040b59b92dca |
comparison
equal
deleted
inserted
replaced
31354:81fbd5f34ee7 | 31355:45a03dd92f28 |
---|---|
165 let winid = win_getid() | 165 let winid = win_getid() |
166 let [winrow, wincol] = win_screenpos(winid) | 166 let [winrow, wincol] = win_screenpos(winid) |
167 let pos = screenpos(winid, 1, 66) | 167 let pos = screenpos(winid, 1, 66) |
168 call assert_equal(winrow, pos.row) | 168 call assert_equal(winrow, pos.row) |
169 call assert_equal(wincol + 66 + 3, pos.col) | 169 call assert_equal(wincol + 66 + 3, pos.col) |
170 | |
171 call assert_fails('echo screenpos(0, 2, 1)', 'E966:') | |
172 | |
170 close | 173 close |
171 bwipe! | 174 bwipe! |
172 endfunc | 175 endfunc |
173 | 176 |
174 " Save the visual start character position | 177 " Save the visual start character position |