termux / termux/termux-api

Cannot copy text consisting only of whitespace

Open
#112 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
4.3k
Forks
920
PR merge metrics
No merged PRs in 30d

Description

Abstract

Strings consisting only of whitespace are not copied to the clipboard, and instead the clipboard is cleared.

Steps to reproduce
$ termux-clipboard-set TEST
$ termux-clipboard get
TEST
$ printf '\r\n\r\t\n \r' | termux-clipboard set
$ termux-clipboard-get
Expected output

A string identical to that passed to printf

Actual output

A single newline

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with the termux-clipboard-set and termux-clipboard-get commands shown in the report, then trace the clipboard-set entry point that handles their input. Done means whitespace-only text is preserved instead of being cleared, and the retrieved output matches the string passed to printf.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
cli, mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.