Skip to content

[Bug]: After typing the command and hitting enter last symbol is deleted #27108

@vrtareg

Description

@vrtareg

Problem description

Hi Team

I noticed that in some cases if I am trying to edit command line or bringing it back from history by up down and trying to execute it the symbol before the cursor is deleted like backspace is pressed before command execution.

Like "ls -al" will become "ls-al" no space if cursor is after space before - or it will be "ls -a" if at the end of line.

Regards, Areg

What steps will reproduce the bug?

Open terminal
press up to bring last command from history
edit something, like last command was "pd aux" by mistake instead of "ps aux" so cursor will be right after s letter and hit enter
actual executed command will be "p aux" as s will be deleted
Same could happen with correct command like "ps aux" will be "ps au" last symbol deleted if cursor is not moved

What is the expected behavior?

There should not be a backspace or symbol before the cursor deletes

System information

Termux Variables:
TERMUX_APK_RELEASE=F_DROID
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP_PID=24510
TERMUX_APP__DATA_DIR=/data/user/0/com.termux
TERMUX_APP__LEGACY_DATA_DIR=/data/data/com.termux
TERMUX_APP__SE_FILE_CONTEXT=u:object_r:app_data_file:s0:c228,c258,c512,c768
TERMUX_APP__SE_INFO=default:targetSdkVersion=28:complete
TERMUX_IS_DEBUGGABLE_BUILD=0
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.3
TERMUX__HOME=/data/data/com.termux/files/home
TERMUX__PREFIX=/data/data/com.termux/files/usr
TERMUX__ROOTFS_DIR=/data/data/com.termux/files
TERMUX__SE_PROCESS_CONTEXT=u:r:untrusted_app_27:s0:c228,c258,c512,c768
TERMUX__USER_ID=0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://termux.librehat.com/apt/termux-main stable main
Updatable packages:
bash-completion/stable 2.17.0-1 all [upgradable from: 2.16.0]
brotli/stable 1.2.0 aarch64 [upgradable from: 1.1.0-3]
clang/stable 21.1.4 aarch64 [upgradable from: 21.1.3-1]
command-not-found/stable 3.2-2 aarch64 [upgradable from: 3.1-16]
dnsutils/stable 9.20.15 aarch64 [upgradable from: 9.20.13]
git/stable 2.51.2 aarch64 [upgradable from: 2.51.1]
glib/stable 2.86.1 aarch64 [upgradable from: 2.86.0]
libbluray/stable 1.4.0 aarch64 [upgradable from: 1.3.4-3]
libc++/stable 28c-1 aarch64 [upgradable from: 28c]
libcompiler-rt/stable 21.1.4 aarch64 [upgradable from: 21.1.3-1]
libdav1d/stable 1.5.2 aarch64 [upgradable from: 1.5.1-1]
libdrm/stable 2.4.128 aarch64 [upgradable from: 2.4.127]
libllvm/stable 21.1.4 aarch64 [upgradable from: 21.1.3-1]
libmpg123/stable 1.33.3 aarch64 [upgradable from: 1.33.2]
libnghttp2/stable 1.68.0 aarch64 [upgradable from: 1.67.1]
libudfread/stable 1.2.0 aarch64 [upgradable from: 1.1.2-1]
libunbound/stable 1.24.1-1 aarch64 [upgradable from: 1.24.0]
lld/stable 21.1.4 aarch64 [upgradable from: 21.1.3-1]
llvm/stable 21.1.4 aarch64 [upgradable from: 21.1.3-1]
ndk-sysroot/stable 28c-1 aarch64 [upgradable from: 28c]
netcat-openbsd/stable 1.234-1-0 aarch64 [upgradable from: 1.229-1-4]
openjdk-17-x/stable 17.0.17-1 aarch64 [upgradable from: 17.0.16-2]
openjdk-17/stable 17.0.17-1 aarch64 [upgradable from: 17.0.16-2]
pcre2/stable 10.47 aarch64 [upgradable from: 10.46]
python-pip/stable 25.3 all [upgradable from: 25.2]
unbound/stable 1.24.1-1 aarch64 [upgradable from: 1.24.0]
vulkan-loader-generic/stable 1.4.331 aarch64 [upgradable from: 1.4.329]
termux-tools version:
1.45.0
Android version:
14
Kernel build information:
Linux localhost 5.4.289-qgki-g73b3c5bfb605 #1 SMP PREEMPT Tue Sep 30 10:00:31 UTC 2025 f2fs-hash:2f5bc4e005 aarch64 Android
Device manufacturer:
Xiaomi
Device model:
2107113SG
Supported ABIs:
SUPPORTED_ABIS: arm64-v8a,armeabi-v7a,armeabi
SUPPORTED_32_BIT_ABIS: armeabi-v7a,armeabi
SUPPORTED_64_BIT_ABIS: arm64-v8a
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec-ld-preload.so

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions