mirror of
				https://github.com/sammy-ette/Hilbish
				synced 2025-08-10 02:52:03 +00:00 
			
		
		
		
	fix: check if interactive when handling signals
This commit is contained in:
		
							parent
							
								
									2a71fb0075
								
							
						
					
					
						commit
						6ac4aa50b3
					
				
							
								
								
									
										5
									
								
								main.go
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								main.go
									
									
									
									
									
								
							@ -200,7 +200,6 @@ input:
 | 
				
			|||||||
				}
 | 
									}
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		running = true
 | 
					 | 
				
			||||||
		HandleHistory(input)
 | 
							HandleHistory(input)
 | 
				
			||||||
		RunInput(input)
 | 
							RunInput(input)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -266,12 +265,12 @@ func HandleSignals() {
 | 
				
			|||||||
		switch s {
 | 
							switch s {
 | 
				
			||||||
		case os.Interrupt:
 | 
							case os.Interrupt:
 | 
				
			||||||
			hooks.Em.Emit("signals.sigint")
 | 
								hooks.Em.Emit("signals.sigint")
 | 
				
			||||||
			if !running {
 | 
								if !running && interactive {
 | 
				
			||||||
				lr.ClearInput()
 | 
									lr.ClearInput()
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		case syscall.SIGWINCH:
 | 
							case syscall.SIGWINCH:
 | 
				
			||||||
			hooks.Em.Emit("signals.resize")
 | 
								hooks.Em.Emit("signals.resize")
 | 
				
			||||||
			if !running {
 | 
								if !running && interactive {
 | 
				
			||||||
				lr.Resize()
 | 
									lr.Resize()
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user