Closed vext01 closed 8 months ago
gdb) bt
#0 memmove () at /usr/src/lib/libc/arch/amd64/string/memmove.S:88
#1 0x00000a47a472f4aa in wb_replace_force (
buf=0xa47a47653b0 <le_main_buffer>, i=<optimized out>, bn=<optimized out>,
s=0x7a54ed32c2dc L"1\xa4765768ੇ", sn=<optimized out>) at strbuf.c:377
#2 0x00000a47a474b77e in wb_ninsert_force (
buf=0xa47a47653b0 <le_main_buffer>, i=11314281103356, s=<optimized out>,
n=1) at ./../strbuf.h:381
#3 cmd_self_insert (c=49 L'1') at editing.c:831
#4 0x00000a47a474b448 in le_invoke_command (cmd=0xe48ba58cd21e2b34,
arg=1337245692 L'\x4fb4bffc') at editing.c:402
#5 0x00000a47a4757650 in read_next () at lineedit.c:329
#6 le_readline (prompt=..., trap=<optimized out>, resultp=0x7a54ed32c3f0)
at lineedit.c:85
#7 0x00000a47a4716b25 in input_interactive (buf=0x7a54ed32c548,
inputinfo=0x7a54ed32c660) at input.c:263
#8 0x00000a47a471e44a in read_more_input (ps=0x7a54ed32c538) at parser.c:940
#9 next_token (ps=0x7a54ed32c538) at parser.c:1028
#10 0x00000a47a471c07a in parse_command_list (ps=0x7a54ed32c538,
toeol=<optimized out>) at parser.c:1836
#11 0x00000a47a471bdae in read_and_parse (info=<optimized out>,
resultp=0x7a54ed32c618) at parser.c:761
#12 0x00000a47a473ac48 in parse_and_exec (pinfo=0x7a54ed32c670,
finally_exit=<optimized out>) at yash.c:528
--Type <RET> for more, q to quit, c to continue without paging--
#13 0x00000a47a473aafe in exec_input (fd=<optimized out>,
name=<optimized out>, options=<optimized out>) at yash.c:501
#14 0x00000a47a473a8ec in main (argc=1, argv=<optimized out>) at yash.c:242
That latter backtrace was generated by doing:
ls
, yash suggested ls /123
alt+c
a few times, the cursor is jumping all over the place at this point1
This was on a freshly cloned master branch with the patches from the openbsd ports and configured like:
CC=clang CPPFLAGS="-std=c99 -I/usr/local/include" LDFLAGS="-L/usr/local/lib" ./configure
I also notice that alt+c (which i believe should accept the next suggested word?) sometimes corrupts the capiltalisation of the suggestion.
Is there a way to change the alt+c
binding to ctrl+arrowkey-right
?
Thank you for reporting.
I also notice that alt+c (which i believe should accept the next suggested word?) sometimes corrupts the capiltalisation of the suggestion.
Is there a way to change the
alt+c
binding toctrl+arrowkey-right
?
Alt+c
is by default bound to the emacs-capitalize-word
command, which modifies the capitalization of the word at the cursor. If you just want to insert the suggested word, the forward-emacsword
command would be what you want. It is by default bound to Alt+f
, and also can be bound to Alt+c
by running bindkey -e '\^[c' forward-emacsword
.
Start the shell with yash --norcfile --emacs
and the bug is reproducible just by hitting Alt+c
without typing anything.
Thanks for fixing this so fast!
One more question: \SR
binds shift+→
. Is there a way to bind ctrl+→
?
It's not \^\R
:)
https://osdn.net/projects/yash/ticket/46524#comment:3863:46524:1674056716
Many terminals reserve the Ctrl-Arrow key for their own functions such as scrolling and window switching, and I don't think common terminfo databases define capabilities for the Ctrl-Arrow key. That means the current architecture of yash cannot support binding the Ctrl-Arrow key in the same way as other keys. But if you are sure that your terminal emits
^[[1;5D
and^[[1;5C
for the Ctrl-Left/Right key, the following commands may help.bindkey -e '\^[[1;5D' backward-emacsword bindkey -e '\^[[1;5C' forward-emacsword
Describe the bug
I can sometimes get a seg fault by repeatedly pressing alt+c to accept suggested completions.
To Reproduce
ls
and yash offeredls /123
.alt+c
to accept arguments. I think i may have pressed enter after.Here's a low-quality backtrace:
I'll try to get a better one with symbols on master.
Environment (please complete the following information):