diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2025-09-29 08:55:23 -0400 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2025-09-29 08:55:23 -0400 |
| commit | 9562328016fb0e219184a0ec18a5e6ea8f09d138 (patch) | |
| tree | f23e25ec88a875eb9f2aa1a87ca2d3c302b6c85a /ui.go | |
| parent | 0e9a7e9508a5c7c0107aa2475b7e6770e25857c5 (diff) | |
| download | pfc-9562328016fb0e219184a0ec18a5e6ea8f09d138.zip | |
enter duplicates stack val if buf empty
Diffstat (limited to 'ui.go')
| -rw-r--r-- | ui.go | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -64,6 +64,8 @@ func (ui UI) Update(msg tea.Msg) (tea.Model, tea.Cmd) { fn(&ui.calc) } else if v, err := ui.calc.parseBuffer(); err == nil { ui.calc.stack.push(v) + } else if ui.calc.buf == "" { + ui.calc.dup() } ui.calc.buf = "" default: |