bug: Hex code `0x17` doesn't work with some word boundaries

Resolved 💬 5 comments Opened Apr 16, 2025 by HeroBrian389 Closed Apr 17, 2025
💡 Likely answer: A maintainer (tibo-openai, collaborator) responded on this thread — see the highlighted reply below.

I have 0x17 mapped to ctrl+backspace. This hex code allows me to delete single words.

There is an issue with certain word boundaries though. I'll outline some examples of expected behaviour vs reality to illustrate. The cursor will be denoted with |.

In each case, I will do ctrl+backspace (which sends the hex code 0x17).

Case 1

String 1:
I want you to refactor my view|

Expected output:
I want you to refactor my|

Actual output:
I want you to refactor my|

This case works as intended. However, let's consider the next case:

Case 2

String 2:
I want you to refactor my view |

Expected output:
I want you to refactor my|

Actual output:
``

It deletes the whole line, rather than the last word in the sequence (likely because of word boundary issues where a trailing space after the last word treats the whole line as a word?).

View original on GitHub ↗

5 Comments

er1c · 1 year ago
tibo-openai collaborator · 1 year ago

Fixed if you build from source. New release will be cut shortly.

HeroBrian389 · 1 year ago

Unfortunately, it doesn't seem to be fixed. I'm not sure if it's an issue on my side.

Steps to reproduce:

nvm use 22

git clone https://github.com/openai/codex.git
cd codex/codex-cli

npm install
npm run build

node ./dist/cli.js

I have the latest version of the branch as far as I can tell:

$ git rev-parse HEAD
b0ccca555685b1534a0028cb7bfdcad8fe2e477a

This matches the latest commit at time of writing: b0ccca555685b1534a0028cb7bfdcad8fe2e477a.

Edit:
Here is a video showcasing this issue: link

mpr1255 · 1 year ago

Came here about this. Driving me absolutely crazy. If you don't have a space after the last word, the behavior is normal (deletes only the last word). If you have a SPACE, it will wipe out all your input. Have snagged myself on this more than once now.

tl;dr: Not fixed. I'm on 0.1.4161114

josejassojr · 13 days ago

@claude review this PR for correctness bugs, security issues, and code quality.