16
16
" last position
17
17
let g: quickui #context#cursor = -1
18
18
19
- " save positions
20
- let s: previous_cursor = {}
21
19
22
20
23
21
" ----------------------------------------------------------------------
@@ -105,11 +103,6 @@ function! s:vim_create_context(textlist, opts)
105
103
let hwnd.winid = winid
106
104
let hwnd.index = get (a: opts , ' index' , -1 )
107
105
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
113
106
let opts = {' minwidth' :w , ' maxwidth' :w , ' minheight' :h , ' maxheight' :h }
114
107
if has_key (a: opts , ' line' ) && has_key (a: opts , ' col' )
115
108
let opts.line = a: opts .line
@@ -273,9 +266,6 @@ function! s:popup_exit(winid, code)
273
266
let g: quickui #context#current = hwnd
274
267
let g: quickui #context#cursor = hwnd.index
275
268
let redrawed = 0
276
- if has_key (hwnd.opts, ' savepos' )
277
- let s: previous_cursor [hwnd.opts.savepos] = hwnd.index
278
- endif
279
269
if has_key (hwnd.opts, ' callback' )
280
270
let F = function (hwnd.opts.callback)
281
271
call F (code)
@@ -507,11 +497,6 @@ function! s:nvim_create_context(textlist, opts)
507
497
let h = hwnd.height
508
498
let hwnd.index = get (a: opts , ' index' , -1 )
509
499
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
515
500
let opts = {' width' :w , ' height' :h , ' focusable' :1 , ' style' :' minimal' }
516
501
let opts.relative = ' editor'
517
502
if has_key (a: opts , ' line' ) && has_key (a: opts , ' col' )
@@ -624,9 +609,6 @@ function! s:nvim_create_context(textlist, opts)
624
609
let g: quickui #context#code = retval
625
610
let g: quickui #context#current = hwnd
626
611
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
630
612
if has_key (hwnd.opts, ' callback' )
631
613
let F = function (hwnd.opts.callback)
632
614
call F (retval)
@@ -653,7 +635,7 @@ endfunc
653
635
" ----------------------------------------------------------------------
654
636
" reduce with file types
655
637
" ----------------------------------------------------------------------
656
- function ! s: reduce_items (textlist)
638
+ function ! quickui#context# reduce_items (textlist)
657
639
let output = []
658
640
let state = 1
659
641
let index = 0
@@ -697,9 +679,6 @@ endfunc
697
679
" ----------------------------------------------------------------------
698
680
function ! quickui#context#open (textlist, opts)
699
681
let textlist = a: textlist
700
- if get (a: opts , ' reduce' , 0 ) != 0
701
- let textlist = s: reduce_items (a: textlist )
702
- endif
703
682
if g: quickui #core#has_nvim == 0
704
683
return s: vim_create_context (textlist, a: opts )
705
684
else
0 commit comments