mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 10:42:45 +00:00 
			
		
		
		
	LibLine: Ignore interrupts unless actively editing
It does not make much sense to receive an interrupt and process it *much later*. Also patches Userland/js to only create exceptions while some code is actually running.
This commit is contained in:
		
							parent
							
								
									8b195d1211
								
							
						
					
					
						commit
						7ecf29f206
					
				
					 3 changed files with 14 additions and 2 deletions
				
			
		|  | @ -107,7 +107,11 @@ public: | |||
| 
 | ||||
|     // FIXME: we will have to kindly ask our instantiators to set our signal handlers
 | ||||
|     // since we can not do this cleanly ourselves (signal() limitation: cannot give member functions)
 | ||||
|     void interrupted() { m_was_interrupted = true; } | ||||
|     void interrupted() | ||||
|     { | ||||
|         if (m_is_editing) | ||||
|             m_was_interrupted = true; | ||||
|     } | ||||
|     void resized() { m_was_resized = true; } | ||||
| 
 | ||||
|     size_t cursor() const { return m_cursor; } | ||||
|  | @ -148,6 +152,8 @@ public: | |||
|         m_finish = true; | ||||
|     } | ||||
| 
 | ||||
|     bool is_editing() const { return m_is_editing; } | ||||
| 
 | ||||
| private: | ||||
|     void vt_save_cursor(); | ||||
|     void vt_restore_cursor(); | ||||
|  | @ -291,6 +297,8 @@ private: | |||
| 
 | ||||
|     bool m_initialized { false }; | ||||
|     bool m_refresh_needed { false }; | ||||
| 
 | ||||
|     bool m_is_editing { false }; | ||||
| }; | ||||
| 
 | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 AnotherTest
						AnotherTest