Commit Graph

40 Commits (ea2791859c7e4ef41f688f565ff314326634e306)

Author SHA1 Message Date
TorchedSammy 387d7d2243
fix: percentages in completion entries causing a problem in the completion menus 2022-07-26 19:24:02 -04:00
TorchedSammy 3e0a2d630b
feat(hilbish.editor): add getLine function to get contents of line 2022-07-19 17:55:03 -04:00
TorchedSammy dd9bdca5e0
fix(readline): only call raw input callback if not nil 2022-07-13 15:35:33 -04:00
TorchedSammy 08e2951513
feat: add raw input hook (closes #180) 2022-07-10 20:34:00 -04:00
TorchedSammy 7e57b3de7d
fix: check if input is 0 on multiline splitting (closes #170) 2022-06-20 15:35:25 -04:00
TorchedSammy 1b4b41846f
chore: merge from remote branch 2022-05-31 15:17:50 -04:00
TorchedSammy 3196f0dcb9
fix: don't refetch tab completion on refresh if its already open (closes #163) 2022-05-31 15:16:32 -04:00
TorchedSammy f9a2a981b4
fix: revert "fix: multiline cursor redraw"
This reverts commit 1339dc4a2f.
this caused a few issues, including
history search messing up previous lines
what this commit was trying to fix is unimportant anyway
2022-05-29 19:02:20 -04:00
TorchedSammy 1339dc4a2f
fix: multiline cursor redraw 2022-05-28 21:05:03 -04:00
TorchedSammy 2faaf4e045
fix: print err don't panic and in the case of regex compile failing on menu find 2022-05-28 20:19:49 -04:00
TorchedSammy dc933934eb
feat: add hilbish.editor interface
this is going to be a middle level interface
which brings functions for interacting
with the line editor used in hilbish

adds the following functions:
setVimRegister(reg, text) - sets text in a vim register
getVimRegister(reg) - gets text from a vim register
insert(text) - inserts text into the line
accessible via hilbish.editor
2022-05-13 20:43:40 -04:00
ym555 6ccb9ebeff
fix(readline): take into account character width (#145)
first step towards unicode support yay
2022-04-20 08:18:34 -04:00
TorchedSammy b83c09a2b3
fix(readline): check stdin error properly 2022-04-19 10:30:04 -04:00
TorchedSammy bee8d6e9e6
fix(readline): input going to next line if its longer than terminal width 2022-04-18 22:42:27 -04:00
TorchedSammy 48cb62282d
fix(readline): input getting cut off on enter 2022-04-18 22:36:54 -04:00
TorchedSammy 1e48a3e03d
fix(readline): home and end buttons not putting the cursor in the right place 2022-04-18 16:04:56 -04:00
TorchedSammy 4e8aa7ed1d
fix(readline): use invert for completion highlight instead of hardcoded colors 2022-04-17 23:39:53 -04:00
Renzix 7f161e6683
feat: added forward/backward word keybinds (#139)
Added emacsForwardWord and emacsBackwardWord which is used by M-f and
M-b directly. Also added M-d to ctrl delete and removed the bad old
funcion in favor of the fancy new one. Lastly I added alt delete which
deletes with emacsBackwardWord. Works identically to gnu readline

Co-authored-by: Renzix <DanielDeBruno@renzix.com>
2022-04-14 07:42:46 -04:00
TorchedSammy 194e4e01b7
fix: don't insert any unhandled control keys 2022-04-13 19:36:18 -04:00
TorchedSammy e5c9b85008
feat: add ctrl _ to undo 2022-04-13 16:58:36 -04:00
sammyette 0a2046e985
feat: add right prompt (#140)
* feat: add right prompt (closes #111)

* chore: add comment for set right prompt function

* fix: add 1 space at the end of right prompt to fix character cut off

* docs: update doc for prompt function
2022-04-13 10:13:46 -04:00
sammyette ce625aca0c
feat: add ctrl delete to forward delete word (#138)
* feat: add ctrl delete to forward delete word (closes #124)

* fix: make delete word function accurately

* fix: make ctrl delete work on st
2022-04-12 23:08:44 -04:00
TorchedSammy 1715a1f626
feat: make ctrl d delete char below cursor if line isnt empty 2022-04-12 21:02:01 -04:00
TorchedSammy c342f4f6f5
fix: handle when stdin is in nonblocking mode (closes #136) 2022-04-08 10:46:25 -04:00
Renzix 0ebd8d9035
feat: added alt backspace keybinding (#132)
Co-authored-by: Renzix <DanielDeBruno@renzix.com>
2022-03-29 22:15:23 -04:00
Renzix 52caedc1f1
feat: delete key on st and fix: delete key crash on xterm (#131)
* fix: delete key on st

* fix: delete key crash on xterm

Co-authored-by: Renzix <DanielDeBruno@renzix.com>
2022-03-29 20:35:51 -04:00
TorchedSammy 20fae8a870
fix: prompt refresh (closes #116) 2022-03-29 13:07:27 -04:00
Renzix 61c9e12a4a
feat: control k to delete the rest of the line (#128)
Co-authored-by: Renzix <DanielDeBruno@renzix.com>
2022-03-26 23:43:30 -04:00
TorchedSammy 6ea25a22b3
feat: add inline hint text and change what were hints previously to info (closes #126) 2022-03-26 17:34:09 -04:00
TorchedSammy 577f00dfef
fix(readline): make forward delete work properly 2022-03-23 21:11:24 -04:00
TorchedSammy 722bd1cd80
fix(readline): insert text in replace mode if cursor is at end of text 2022-03-23 21:10:04 -04:00
TorchedSammy f27d60f827
fix: move cursor to end of line on history search (closes #121) 2022-03-21 06:47:14 -04:00
TorchedSammy 925ded6cea
fix(readline): remove duplicate code 2022-03-17 19:57:57 -04:00
TorchedSammy 0ee47cc6f0
fix(readline): clear history filter on Readline, fixes filtering after ctrl-c 2022-03-15 16:27:12 -04:00
TorchedSammy ae449b89eb
fix(readline): dont show completions menu if there is only 1 entry (closes #107) 2022-03-14 20:17:45 -04:00
TorchedSammy 91222f9d74
fix(readline): dont reduce pos if its at 0 2022-03-13 20:00:11 -04:00
TorchedSammy 726d265cca
feat: add hilbish.vimAction hook (closes #108) 2022-03-13 16:44:11 -04:00
TorchedSammy 5e505d0a8d
fix: increate pos by 1 at paste instead of 2 2022-03-13 16:40:58 -04:00
TorchedSammy 0113a4e0b4
fix(readline): make esc escape any vim mode 2022-03-13 14:26:44 -04:00
TorchedSammy 5a2e3e4700
chore: bring readline in repo for easier maintenance 2022-03-13 13:48:49 -04:00