@@ -13,7 +13,7 @@ export async function bufferGetSelections(
1313 window : Window ,
1414 client : NeovimClient ,
1515) : Promise < Selection [ ] > {
16- const luaCode = `return require("cursorless.cursorless ").buffer_get_selection()` ;
16+ const luaCode = `return require("cursorless").buffer_get_selection()` ;
1717 // Note lines are indexed from 1, similarly to what is shown in neovim
1818 // and columns are also indexed from 1
1919 const [ startLine , startCol , endLine , endCol , reverse ] =
@@ -60,7 +60,7 @@ export async function bufferSetSelections(
6060 // cursorless has 0-based lines/columns, but neovim has 1-based lines and 0-based columns
6161 // also, experience shows we need to subtract 1 from the end character to stop on it in visual mode (instead of after it)
6262 // https://neovim.io/doc/user/api.html#nvim_win_set_cursor()
63- const luaCode = `return require("cursorless.cursorless ").select_range(${
63+ const luaCode = `return require("cursorless").select_range(${
6464 selections [ 0 ] . start . line + 1
6565 } , ${ selections [ 0 ] . start . character } , ${ selections [ 0 ] . end . line + 1 } , ${
6666 selections [ 0 ] . end . character
@@ -85,7 +85,7 @@ export async function windowGetVisibleRanges(
8585) : Promise < Range [ ] > {
8686 // Get the first and last visible lines of the current window
8787 // Note they are indexed from 1, similarly to what is shown in neovim*
88- const luaCode = `return require("cursorless.cursorless ").window_get_visible_lines()` ;
88+ const luaCode = `return require("cursorless").window_get_visible_lines()` ;
8989 const [ firstLine , lastLine ] = ( await client . executeLua ( luaCode , [ ] ) ) as [
9090 number ,
9191 number ,
@@ -116,15 +116,15 @@ export async function getCursorlessNvimPath(
116116 * https://stackoverflow.com/questions/11489428/how-can-i-make-vim-paste-from-and-copy-to-the-systems-clipboard?page=1&tab=scoredesc#tab-top
117117 * https://stackoverflow.com/questions/30691466/what-is-difference-between-vims-clipboard-unnamed-and-unnamedplus-settings
118118 */
119- export async function putToClipboard ( data : string , client : NeovimClient ) {
119+ export async function setClipboard ( data : string , client : NeovimClient ) {
120120 await client . callFunction ( "setreg" , [ "*" , data ] ) ;
121121}
122122
123123/**
124124 * Return the string from the operating system clipboard
125125 * https://vimdoc.sourceforge.net/htmldoc/eval.html#getreg()
126126 */
127- export async function getFromClipboard ( client : NeovimClient ) : Promise < string > {
127+ export async function getClipboard ( client : NeovimClient ) : Promise < string > {
128128 return await client . callFunction ( "getreg" , [ "*" ] ) ;
129129}
130130
0 commit comments