mirror of
				https://github.com/neovim/neovim.git
				synced 2025-11-04 01:34:25 +00:00 
			
		
		
		
	vim-patch:8.1.0754: preferred column when setting 'cursorcolumn' #10549
Problem:    Preferred column is lost when setting 'cursorcolumn'.
Solution:   Change option flag to P_RWINONLY. (Takayuki Kurosawa,
            closes vim/vim#3806)
177ab9e026
			
			
This commit is contained in:
		
				
					committed by
					
						
						Justin M. Keyes
					
				
			
			
				
	
			
			
			
						parent
						
							643ba06d4d
						
					
				
				
					commit
					7935f6ce35
				
			@@ -543,7 +543,7 @@ return {
 | 
				
			|||||||
      full_name='cursorcolumn', abbreviation='cuc',
 | 
					      full_name='cursorcolumn', abbreviation='cuc',
 | 
				
			||||||
      type='bool', scope={'window'},
 | 
					      type='bool', scope={'window'},
 | 
				
			||||||
      vi_def=true,
 | 
					      vi_def=true,
 | 
				
			||||||
      redraw={'current_window'},
 | 
					      redraw={'current_window_only'},
 | 
				
			||||||
      defaults={if_true={vi=false}}
 | 
					      defaults={if_true={vi=false}}
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -44,3 +44,23 @@ func Test_curswant_with_autocommand()
 | 
				
			|||||||
  quit!
 | 
					  quit!
 | 
				
			||||||
endfunc
 | 
					endfunc
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					" Tests for behavior of curswant with cursorcolumn/line
 | 
				
			||||||
 | 
					func Test_curswant_with_cursorcolumn()
 | 
				
			||||||
 | 
					  new
 | 
				
			||||||
 | 
					  call setline(1, ['01234567', ''])
 | 
				
			||||||
 | 
					  exe "normal! ggf6j"
 | 
				
			||||||
 | 
					  call assert_equal(6, winsaveview().curswant)
 | 
				
			||||||
 | 
					  set cursorcolumn
 | 
				
			||||||
 | 
					  call assert_equal(6, winsaveview().curswant)
 | 
				
			||||||
 | 
					  quit!
 | 
				
			||||||
 | 
					endfunc
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func Test_curswant_with_cursorline()
 | 
				
			||||||
 | 
					  new
 | 
				
			||||||
 | 
					  call setline(1, ['01234567', ''])
 | 
				
			||||||
 | 
					  exe "normal! ggf6j"
 | 
				
			||||||
 | 
					  call assert_equal(6, winsaveview().curswant)
 | 
				
			||||||
 | 
					  set cursorline
 | 
				
			||||||
 | 
					  call assert_equal(6, winsaveview().curswant)
 | 
				
			||||||
 | 
					  quit!
 | 
				
			||||||
 | 
					endfunc
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user