diff options
Diffstat (limited to '')
| -rw-r--r-- | src/c_defs.go | 1 | ||||
| -rw-r--r-- | src/i_events.go | 10 | 
2 files changed, 10 insertions, 1 deletions
| diff --git a/src/c_defs.go b/src/c_defs.go index 12169f8..8fa69e6 100644 --- a/src/c_defs.go +++ b/src/c_defs.go @@ -76,6 +76,7 @@ const (  	ERROR_MODE   = 3  	WELCOME_MODE = 4  	MKDIR_MODE   = 5 +	INSERT_MODE  = 6  )  const ( diff --git a/src/i_events.go b/src/i_events.go index 4c37315..3767fa9 100644 --- a/src/i_events.go +++ b/src/i_events.go @@ -43,7 +43,7 @@   * POSSIBILITY OF SUCH DAMAGE.   *   * hardflip: src/i_events.go - * Wed Feb 21 12:10:39 2024 + * Wed Feb 21 14:39:57 2024   * Joe   *   * events in the code @@ -441,6 +441,9 @@ func i_events(data *HardData) {  				} else {  					i_unfold_dir(data, data.litems.curr)  				} +			} else if event.Rune() == 'a' || +					  event.Rune() == 'i' { +				data.ui.mode = INSERT_MODE  			} else if event.Key() == tcell.KeyCtrlR {  				event = nil  				i_reload_data(data) @@ -488,6 +491,11 @@ func i_events(data *HardData) {  					data.opts.GPG = ""  				}  			} +		case INSERT_MODE: +			if event.Key() == tcell.KeyEscape || +			   event.Key() == tcell.KeyCtrlC { +				data.ui.mode = NORMAL_MODE +			}  		case MKDIR_MODE:  			if event.Key() == tcell.KeyEscape ||  			   event.Key() == tcell.KeyCtrlC { | 
