mirror of
				https://github.com/sammy-ette/Hilbish
				synced 2025-08-10 02:52:03 +00:00 
			
		
		
		
	feat: add ctrl delete to forward delete word (closes #124)
This commit is contained in:
		
							parent
							
								
									f002eca258
								
							
						
					
					
						commit
						ab4fa85c26
					
				| @ -49,6 +49,7 @@ var ( | |||||||
| 	seqEndSc        = string([]byte{27, 91, 52, 126}) | 	seqEndSc        = string([]byte{27, 91, 52, 126}) | ||||||
| 	seqDelete       = string([]byte{27, 91, 51, 126}) | 	seqDelete       = string([]byte{27, 91, 51, 126}) | ||||||
| 	seqDelete2      = string([]byte{27, 91, 80}) | 	seqDelete2      = string([]byte{27, 91, 80}) | ||||||
|  | 	seqCtrlDelete   = string([]byte{27, 91, 51, 59, 53, 126}) | ||||||
| 	seqShiftTab     = string([]byte{27, 91, 90}) | 	seqShiftTab     = string([]byte{27, 91, 90}) | ||||||
| 	seqAltQuote     = string([]byte{27, 34})  // Added for showing registers ^[" | 	seqAltQuote     = string([]byte{27, 34})  // Added for showing registers ^[" | ||||||
| 	seqAltR         = string([]byte{27, 114}) // Used for alternative history | 	seqAltR         = string([]byte{27, 114}) // Used for alternative history | ||||||
|  | |||||||
| @ -777,6 +777,18 @@ func (rl *Instance) escapeSeq(r []rune) { | |||||||
| 		rl.viDeleteByAdjust(rl.viJumpB(tokeniseLine)) | 		rl.viDeleteByAdjust(rl.viJumpB(tokeniseLine)) | ||||||
| 		rl.updateHelpers() | 		rl.updateHelpers() | ||||||
| 
 | 
 | ||||||
|  | 	case seqCtrlDelete: | ||||||
|  | 		if rl.modeTabCompletion { | ||||||
|  | 			rl.resetVirtualComp(false) | ||||||
|  | 		} | ||||||
|  | 		// This is only available in Insert mode | ||||||
|  | 		if rl.modeViMode != VimInsert { | ||||||
|  | 			return | ||||||
|  | 		} | ||||||
|  | 		rl.saveToRegister(rl.viJumpW(tokeniseLine)) | ||||||
|  | 		rl.viDeleteByAdjust(rl.viJumpW(tokeniseLine)) | ||||||
|  | 		rl.updateHelpers() | ||||||
|  | 
 | ||||||
| 	default: | 	default: | ||||||
| 		if rl.modeTabFind { | 		if rl.modeTabFind { | ||||||
| 			return | 			return | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user