Skip to content

Commit afb1d0b

Browse files
committed
Dont select the text in the command palette input on focus
1 parent 4751e8a commit afb1d0b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/textual/command.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -331,9 +331,7 @@ class SimpleCommand(NamedTuple):
331331
"""The description of the command."""
332332

333333

334-
CommandListItem: TypeAlias = (
335-
"SimpleCommand | tuple[str, IgnoreReturnCallbackType, str | None] | tuple[str, IgnoreReturnCallbackType]"
336-
)
334+
CommandListItem: TypeAlias = "SimpleCommand | tuple[str, IgnoreReturnCallbackType, str | None] | tuple[str, IgnoreReturnCallbackType]"
337335

338336

339337
class SimpleProvider(Provider):
@@ -776,7 +774,7 @@ def compose(self) -> ComposeResult:
776774
with Vertical(id="--container"):
777775
with Horizontal(id="--input"):
778776
yield SearchIcon()
779-
yield CommandInput(placeholder=self._placeholder)
777+
yield CommandInput(placeholder=self._placeholder, select_on_focus=False)
780778
if not self.run_on_select:
781779
yield Button("\u25b6")
782780
with Vertical(id="--results"):

0 commit comments

Comments
 (0)