Add Double arrow up fix
This commit is contained in:
		
							parent
							
								
									27bb67a0d9
								
							
						
					
					
						commit
						c4c2a5d770
					
				
							
								
								
									
										1
									
								
								Misc/Double arrow up fix/README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								Misc/Double arrow up fix/README.md
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1 @@
 | 
			
		||||
You may have noticed that when you use arrow up to repeat your previous sent message/command, you can't use arrow up to repeat it again. This script fixes this by always resetting your "sent history index" after you submit a message/command.
 | 
			
		||||
@ -0,0 +1,8 @@
 | 
			
		||||
chat_subscribe_prefix("")
 | 
			
		||||
repeat
 | 
			
		||||
	while evt := owf_next_event() do
 | 
			
		||||
		if evt.type == OWF_EVT_SUBMIT_CHAT_MESSAGE then
 | 
			
		||||
			chat_set_sent_history_index(#chat_get_sent_history() + 1)
 | 
			
		||||
		end
 | 
			
		||||
	end
 | 
			
		||||
until yield()
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user