core-agent-ide/codex-cli
Alpha Diop 6829a5a012
fix(text-buffer): correct word deletion logic for trailing spaces (Ctrl+Backspace) (#131)
## Description
This fix resolves a bug where Ctrl+Backspace (hex 0x17) deletes the
entire line when the cursor is positioned after a trailing space.

## Problem
When the user has a line like "I want you to refactor my view " (with a
space at the end) and the cursor is after that space, Ctrl+Backspace
deletes the entire line instead of just removing the word "view".

## Solution
- Added a check to detect if the cursor is after spaces
- Modified the logic to delete only one space at a time in this case
- Added a unit test to verify this behavior

## Tests
All tests pass, including the new test that verifies the corrected
behavior.

---------

Signed-off-by: Alpha Diop <alphakhoss@gmail.com>
Co-authored-by: Thibault Sottiaux <tibo@openai.com>
2025-04-16 16:25:08 -07:00
..
examples chore: fixed gramatical errors in prompt examples (#136) 2025-04-16 15:45:29 -07:00
scripts (fix) update Docker container scripts (#47) 2025-04-16 12:02:41 -07:00
src fix(text-buffer): correct word deletion logic for trailing spaces (Ctrl+Backspace) (#131) 2025-04-16 16:25:08 -07:00
tests fix(text-buffer): correct word deletion logic for trailing spaces (Ctrl+Backspace) (#131) 2025-04-16 16:25:08 -07:00
.dockerignore (fix) update Docker container scripts (#47) 2025-04-16 12:02:41 -07:00
.editorconfig Initial commit 2025-04-16 12:56:08 -04:00
.eslintrc.cjs Initial commit 2025-04-16 12:56:08 -04:00
build.mjs Initial commit 2025-04-16 12:56:08 -04:00
Dockerfile (fix) update Docker container scripts (#47) 2025-04-16 12:02:41 -07:00
ignore-react-devtools-plugin.js Initial commit 2025-04-16 12:56:08 -04:00
package-lock.json dotenv support (#122) 2025-04-16 15:33:12 -07:00
package.json bump(version): 0.1.2504161510 (#135) 2025-04-16 15:49:32 -07:00
require-shim.js Initial commit 2025-04-16 12:56:08 -04:00
tsconfig.json Back out @lib indirection in tsconfig.json (#111) 2025-04-16 14:16:53 -07:00