Lines Matching refs:context
2305 let s = g:Xsetlist([], 'a', {'context':[1,2,3]})
2308 let d = g:Xgetlist({'context':1})
2309 call assert_equal([1,2,3], d.context)
2310 call g:Xsetlist([], 'a', {'context':{'color':'green'}})
2311 let d = g:Xgetlist({'context':1})
2312 call assert_equal({'color':'green'}, d.context)
2313 call g:Xsetlist([], 'a', {'context':"Context info"})
2314 let d = g:Xgetlist({'context':1})
2315 call assert_equal("Context info", d.context)
2316 call g:Xsetlist([], 'a', {'context':246})
2317 let d = g:Xgetlist({'context':1})
2318 call assert_equal(246, d.context)
2319 " set other Vim data types as context
2320 call g:Xsetlist([], 'a', {'context' : test_null_blob()})
2322 call g:Xsetlist([], 'a', {'context' : test_null_channel()})
2325 call g:Xsetlist([], 'a', {'context' : test_null_job()})
2327 call g:Xsetlist([], 'a', {'context' : test_null_function()})
2328 call g:Xsetlist([], 'a', {'context' : test_null_partial()})
2329 call g:Xsetlist([], 'a', {'context' : ''})
2332 " Test for copying context across two different location lists
2336 call setloclist(0, [], 'a', {'context':l})
2340 call assert_equal([1, 2], getloclist(w1_id, {'context':1}).context)
2341 call assert_equal([1, 2], getloclist(w2_id, {'context':1}).context)
2343 call assert_equal([1, 2], getloclist(w2_id, {'context':1}).context)
2346 call assert_equal('', getloclist(0, {'context':1}).context)
2349 " Test for changing the context of previous quickfix lists
2354 call g:Xsetlist([], 'r', {'context' : [1], 'nr' : 1})
2355 call g:Xsetlist([], 'a', {'context' : [2], 'nr' : 2})
2356 " Also, check for setting the context using quickfix list number zero.
2357 call g:Xsetlist([], 'r', {'context' : [3], 'nr' : 0})
2359 let l = g:Xgetlist({'nr' : 1, 'context' : 1})
2360 call assert_equal([1], l.context)
2361 let l = g:Xgetlist({'nr' : 2, 'context' : 1})
2362 call assert_equal([2], l.context)
2363 let l = g:Xgetlist({'nr' : 3, 'context' : 1})
2364 call assert_equal([3], l.context)
2366 " Test for changing the context through reference and for garbage
2367 " collection of quickfix context
2369 call g:Xsetlist([], ' ', {'context' : l})
2371 let x = g:Xgetlist({'context' : 1})
2372 call add(x.context, "green")
2374 call assert_equal(["red", "blue", "green"], x.context)
2377 let m = g:Xgetlist({'context' : 1})
2378 call assert_equal(["red", "blue", "green"], m.context)
2455 call g:Xsetlist([], 'r', {'nr':1,'title':'Colors','context':['Colors']})
2456 call g:Xsetlist([], 'r', {'nr':2,'title':'Fruits','context':['Fruits']})
2467 call assert_equal(['Fruits'], newl1.context)
2470 call assert_equal(['Colors'], newl2.context)
3574 call g:Xsetlist([], 'a', {'id':start_id, 'context':[1,2]})
3575 call assert_equal([1,2], g:Xgetlist({'nr':1, 'context':1}).context)
3695 call assert_equal('', g:Xgetlist({'context' : 0}).context)
3705 call assert_equal({'context' : '', 'id' : 0, 'idx' : 0,
3710 call assert_equal({'context' : '', 'id' : 0, 'idx' : 0,
3726 call assert_equal('', g:Xgetlist({'context' : 0}).context)
3740 call assert_equal('', g:Xgetlist({'id' : qfid, 'context' : 0}).context)
3750 call assert_equal({'context' : '', 'id' : 0, 'idx' : 0, 'items' : [],
3755 call assert_equal({'context' : '', 'id' : 0, 'idx' : 0, 'items' : [],
3763 call assert_equal('', g:Xgetlist({'nr' : 5, 'context' : 0}).context)
3773 call assert_equal({'context' : '', 'id' : 0, 'idx' : 0, 'items' : [],
3778 call assert_equal({'context' : '', 'id' : 0, 'idx' : 0, 'items' : [],
3823 call g:Xsetlist([], 'a', {'context' : {'bus' : 'pci'}})
3874 " marks the location list context as not in use and frees the context.
3877 call setloclist(0, [], 'a', {'context' : []})
3880 echo getloclist(0, {'context' : 1}).context