Skip to content

Commit 87f96ef

Browse files
authored
fix for hiding cursor on windows (#2171)
* fix for hiding cursor on windows * fix freeze * version bump
1 parent b0656fd commit 87f96ef

File tree

5 files changed

+13
-4
lines changed

5 files changed

+13
-4
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

8+
## [0.17.1] - 2023-03-30
9+
10+
### Fixed
11+
12+
- Fix cursor not hiding on Windows https://github.com/Textualize/textual/issues/2170
13+
- Fixed freeze when ctrl-clicking links https://github.com/Textualize/textual/issues/2167 https://github.com/Textualize/textual/issues/2073
14+
815
## [0.17.0] - 2023-03-29
916

1017
### Fixed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "textual"
3-
version = "0.17.0"
3+
version = "0.17.1"
44
homepage = "https://github.com/Textualize/textual"
55
description = "Modern Text User Interface framework"
66
authors = ["Will McGugan <[email protected]>"]

src/textual/_xterm_parser.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
from . import events, messages
88
from ._ansi_sequences import ANSI_SEQUENCES_KEYS
99
from ._parser import Awaitable, Parser, TokenCallback
10-
from ._types import MessageTarget
1110
from .keys import KEY_NAME_REPLACEMENTS, _character_to_key
1211

1312
# When trying to determine whether the current sequence is a supported/valid

src/textual/driver.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,10 @@ def process_event(self, event: events.Event) -> None:
6565
self._down_buttons.append(event.button)
6666
elif isinstance(event, events.MouseUp):
6767
if event.button:
68-
self._down_buttons.remove(event.button)
68+
try:
69+
self._down_buttons.remove(event.button)
70+
except ValueError:
71+
pass
6972
elif isinstance(event, events.MouseMove):
7073
if (
7174
self._down_buttons

src/textual/drivers/windows_driver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def start_application_mode(self) -> None:
7777

7878
self.write("\x1b[?1049h") # Enable alt screen
7979
self._enable_mouse_support()
80-
self.write("\x1b[?25h") # Hide cursor
80+
self.write("\x1b[?25l") # Hide cursor
8181
self.write("\033[?1003h\n")
8282
self._enable_bracketed_paste()
8383

0 commit comments

Comments
 (0)