mirror of
				https://github.com/neovim/neovim.git
				synced 2025-10-26 12:27:24 +00:00 
			
		
		
		
	messages: redraw tabline if it was overdrawn by messages
fixes #8354 Regression from #8088, where we try to avoid clearing the screen if not absolutely necessary
This commit is contained in:
		| @@ -309,6 +309,9 @@ void update_screen(int type) | ||||
|         if (wp->w_winrow + wp->w_height + wp->w_status_height > valid) { | ||||
|           wp->w_redr_status = true; | ||||
|         } | ||||
|         if (valid == 0) { | ||||
|           redraw_tabline = true; | ||||
|         } | ||||
|       } | ||||
|     } else if (msg_scrolled > Rows - 5) {  // clearing is faster | ||||
|       type = CLEAR; | ||||
|   | ||||
| @@ -240,8 +240,8 @@ describe('Screen', function() | ||||
|     end) | ||||
|   end) | ||||
|  | ||||
|   describe('tabnew', function() | ||||
|     it('creates a new buffer', function() | ||||
|   describe('tabs', function() | ||||
|     it('tabnew creates a new buffer', function() | ||||
|       command('sp') | ||||
|       command('vsp') | ||||
|       command('vsp') | ||||
| @@ -299,6 +299,62 @@ describe('Screen', function() | ||||
|                                                              | | ||||
|       ]]) | ||||
|     end) | ||||
|  | ||||
|     it('tabline is redrawn after messages', function() | ||||
|       command('tabnew') | ||||
|       screen:expect([[ | ||||
|         {4: [No Name] }{2: [No Name] }{3:                              }{4:X}| | ||||
|         ^                                                     | | ||||
|         {0:~                                                    }| | ||||
|         {0:~                                                    }| | ||||
|         {0:~                                                    }| | ||||
|         {0:~                                                    }| | ||||
|         {0:~                                                    }| | ||||
|         {0:~                                                    }| | ||||
|         {0:~                                                    }| | ||||
|         {0:~                                                    }| | ||||
|         {0:~                                                    }| | ||||
|         {0:~                                                    }| | ||||
|         {0:~                                                    }| | ||||
|                                                              | | ||||
|       ]]) | ||||
|  | ||||
|       feed(':echo "'..string.rep('x\\n', 11)..'"<cr>') | ||||
|       screen:expect([[ | ||||
|         {1:                                                     }| | ||||
|         x                                                    | | ||||
|         x                                                    | | ||||
|         x                                                    | | ||||
|         x                                                    | | ||||
|         x                                                    | | ||||
|         x                                                    | | ||||
|         x                                                    | | ||||
|         x                                                    | | ||||
|         x                                                    | | ||||
|         x                                                    | | ||||
|         x                                                    | | ||||
|                                                              | | ||||
|         {7:Press ENTER or type command to continue}^              | | ||||
|       ]]) | ||||
|  | ||||
|       feed('<cr>') | ||||
|       screen:expect([[ | ||||
|         {4: [No Name] }{2: [No Name] }{3:                              }{4:X}| | ||||
|         ^                                                     | | ||||
|         {0:~                                                    }| | ||||
|         {0:~                                                    }| | ||||
|         {0:~                                                    }| | ||||
|         {0:~                                                    }| | ||||
|         {0:~                                                    }| | ||||
|         {0:~                                                    }| | ||||
|         {0:~                                                    }| | ||||
|         {0:~                                                    }| | ||||
|         {0:~                                                    }| | ||||
|         {0:~                                                    }| | ||||
|         {0:~                                                    }| | ||||
|                                                              | | ||||
|       ]]) | ||||
|     end) | ||||
|   end) | ||||
|  | ||||
|   describe('insert mode', function() | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Björn Linse
					Björn Linse