Lines Matching refs:current
59 call assert_equal(b1, TclEval('set ::vim::current(buffer)'))
65 call assert_equal(b2, TclEval('set ::vim::current(buffer)'))
103 call assert_fails('tcl $::vim::current(buffer) abcd',
180 let w2 = TclEval('set ::vim::current(window)')
182 let w1 = TclEval('set ::vim::current(window)')
190 call assert_fails('tcl $::vim::current(window) abcd',
217 tcl $::vim::current(window) height 2
221 call assert_equal('2', TclEval('$::vim::current(window) height'))
223 call assert_fails('tcl $::vim::current(window) height 2 2', 'wrong # args:')
224 call assert_fails('tcl $::vim::current(window) height x',
233 tcl set win $::vim::current(window)
287 tcl set b2 $::vim::current(buffer)
288 tcl set w2 $::vim::current(window)
290 tcl set b1 $::vim::current(buffer)
291 tcl set w1 $::vim::current(window)
310 tcl set w2 $::vim::current(window)
312 tcl set w1 $::vim::current(window)
333 tcl set w2 $::vim::current(window)
335 tcl set w1 $::vim::current(window)
351 tcl set w2 $::vim::current(window)
353 tcl set w1 $::vim::current(window)
374 tcl $::vim::current(window) delcmd [list set msg "window deleted"]
379 call assert_fails('tcl $::vim::current(window) delcmd', 'wrong # args')
380 call assert_fails('tcl $::vim::current(window) delcmd x x', 'wrong # args')
390 call assert_equal(expand('%:p'), TclEval('$::vim::current(buffer) name'))
395 call assert_equal('', TclEval('$::vim::current(buffer) name'))
397 call assert_fails('tcl $::vim::current(buffer) name x', 'wrong # args:')
405 call assert_equal(string(bufnr('%')), TclEval('$::vim::current(buffer) number'))
407 call assert_equal(string(bufnr('%')), TclEval('$::vim::current(buffer) number'))
409 call assert_fails('tcl $::vim::current(buffer) number x', 'wrong # args:')
418 call assert_equal('3', TclEval('$::vim::current(buffer) count'))
419 call assert_equal('3', TclEval('$::vim::current(buffer) last'))
423 call assert_equal('3', TclEval('$::vim::current(buffer) count'))
424 call assert_equal('2', TclEval('$::vim::current(buffer) last'))
426 call assert_fails('tcl $::vim::current(buffer) count x', 'wrong # args:')
427 call assert_fails('tcl $::vim::current(buffer) last x', 'wrong # args:')
437 tcl $::vim::current(buffer) delete 4 6
438 tcl $::vim::current(buffer) delete 2
441 call assert_fails('tcl $::vim::current(buffer) delete -1', 'line number out of range')
442 call assert_fails('tcl $::vim::current(buffer) delete 0', 'line number out of range')
443 call assert_fails('tcl $::vim::current(buffer) delete 5', 'line number out of range')
445 call assert_fails('tcl $::vim::current(buffer) delete', 'wrong # args:')
446 call assert_fails('tcl $::vim::current(buffer) delete 1 2 3', 'wrong # args:')
447 call assert_fails('tcl $::vim::current(buffer) delete 1 abc',
452 call assert_fails('tcl $::vim::current(buffer) delete 2 1',
462 tcl set buf $::vim::current(buffer)
481 tcl set buf $::vim::current(buffer)
510 tcl $::vim::current(buffer) set 2 a
514 tcl $::vim::current(buffer) set 3 4 b
516 tcl $::vim::current(buffer) set 4 3 c
520 tcl $::vim::current(buffer) set 2 3 {x y z}
522 tcl $::vim::current(buffer) set 3 2 {X Y Z}
525 call assert_fails('tcl $::vim::current(buffer) set 0 "x"', 'line number out of range')
526 call assert_fails('tcl $::vim::current(buffer) set 6 "x"', 'line number out of range')
528 call assert_fails('tcl $::vim::current(buffer) set', 'wrong # args:')
529 call assert_fails('tcl $::vim::current(buffer) set 1 2 {[list "a" "b"]}',
534 call assert_fails('tcl $::vim::current(buffer) set 1 "x"',
536 call assert_fails('tcl $::vim::current(buffer) set 1 {a b}',
538 call assert_fails('tcl $::vim::current(buffer) set 1 2 {a b}',
548 tcl set buf $::vim::current(buffer)
569 call assert_fails('tcl $::vim::current(buffer) get x', 'expected integer but got "x"')
570 call assert_fails('tcl $::vim::current(buffer) get 1 x', 'expected integer but got "x"')
571 call assert_fails('tcl $::vim::current(buffer) get 1 1 1', 'wrong # args:')
585 call assert_equal('row 3 column 1', TclEval('$::vim::current(buffer) mark a'))
586 call assert_equal('row 4 column 3', TclEval('$::vim::current(buffer) mark B'))
588 call assert_fails('tcl $::vim::current(buffer) mark /', 'invalid mark name')
589 call assert_fails('tcl $::vim::current(buffer) mark z', 'mark not set')
590 call assert_fails('tcl $::vim::current(buffer) mark', 'wrong # args:')
599 tcl set b1 $::vim::current(buffer)
601 tcl set b2 $::vim::current(buffer)
613 call assert_fails('tcl $::vim::current(buffer) option', 'wrong # args:')
624 tcl set b1 $::vim::current(buffer)
628 tcl set b2 $::vim::current(buffer)
643 tcl $::vim::current(buffer) delcmd [list set msg "buffer deleted"]
649 call assert_fails('tcl $::vim::current(buffer) delcmd', 'wrong # args')
650 call assert_fails('tcl $::vim::current(buffer) delcmd x x', 'wrong # args')
657 " Only test errors as ::vim::current(...) is already indirectly
659 call assert_fails('tcl $::vim::current(buffer)', 'wrong # args:')
660 call assert_fails('tcl $::vim::current(window)', 'wrong # args:')
671 tcl set bar_wl [$::vim::current(buffer) windows]
673 tcl set foo_wl [$::vim::current(buffer) windows]
678 call assert_fails('tcl $::vim::current(buffer) windows x', 'wrong # args:')
708 " Test exiting current Tcl interpreter and re-creating one.
730 tcldo $::vim::current(window) cursor 1 5
733 " Check that movement after setting cursor position keeps current column.