1616" last position
1717let g: quickui #context#cursor = -1
1818
19- " save positions
20- let s: previous_cursor = {}
2119
2220
2321" ----------------------------------------------------------------------
@@ -105,11 +103,6 @@ function! s:vim_create_context(textlist, opts)
105103 let hwnd.winid = winid
106104 let hwnd.index = get (a: opts , ' index' , -1 )
107105 let hwnd.opts = deepcopy (a: opts )
108- if has_key (hwnd.opts, ' savepos' )
109- if has_key (s: previous_cursor , hwnd.opts.savepos)
110- let hwnd.index = get (s: previous_cursor , hwnd.opts.savepos, 0 )
111- endif
112- endif
113106 let opts = {' minwidth' :w , ' maxwidth' :w , ' minheight' :h , ' maxheight' :h }
114107 if has_key (a: opts , ' line' ) && has_key (a: opts , ' col' )
115108 let opts.line = a: opts .line
@@ -273,9 +266,6 @@ function! s:popup_exit(winid, code)
273266 let g: quickui #context#current = hwnd
274267 let g: quickui #context#cursor = hwnd.index
275268 let redrawed = 0
276- if has_key (hwnd.opts, ' savepos' )
277- let s: previous_cursor [hwnd.opts.savepos] = hwnd.index
278- endif
279269 if has_key (hwnd.opts, ' callback' )
280270 let F = function (hwnd.opts.callback)
281271 call F (code)
@@ -507,11 +497,6 @@ function! s:nvim_create_context(textlist, opts)
507497 let h = hwnd.height
508498 let hwnd.index = get (a: opts , ' index' , -1 )
509499 let hwnd.opts = deepcopy (a: opts )
510- if has_key (hwnd.opts, ' savepos' )
511- if has_key (s: previous_cursor , hwnd.opts.savepos)
512- let hwnd.index = get (s: previous_cursor , hwnd.opts.savepos, 0 )
513- endif
514- endif
515500 let opts = {' width' :w , ' height' :h , ' focusable' :1 , ' style' :' minimal' }
516501 let opts.relative = ' editor'
517502 if has_key (a: opts , ' line' ) && has_key (a: opts , ' col' )
@@ -624,9 +609,6 @@ function! s:nvim_create_context(textlist, opts)
624609 let g: quickui #context#code = retval
625610 let g: quickui #context#current = hwnd
626611 let g: quickui #context#cursor = hwnd.index
627- if has_key (hwnd.opts, ' savepos' )
628- let s: previous_cursor [hwnd.opts.savepos] = hwnd.index
629- endif
630612 if has_key (hwnd.opts, ' callback' )
631613 let F = function (hwnd.opts.callback)
632614 call F (retval)
@@ -653,7 +635,7 @@ endfunc
653635" ----------------------------------------------------------------------
654636" reduce with file types
655637" ----------------------------------------------------------------------
656- function ! s: reduce_items (textlist)
638+ function ! quickui#context# reduce_items (textlist)
657639 let output = []
658640 let state = 1
659641 let index = 0
@@ -697,9 +679,6 @@ endfunc
697679" ----------------------------------------------------------------------
698680function ! quickui#context#open (textlist, opts)
699681 let textlist = a: textlist
700- if get (a: opts , ' reduce' , 0 ) != 0
701- let textlist = s: reduce_items (a: textlist )
702- endif
703682 if g: quickui #core#has_nvim == 0
704683 return s: vim_create_context (textlist, a: opts )
705684 else
0 commit comments