PyTermGUI 7.8.0__py3-none-any.whl → 7.8.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## [7.8.1] - 2026-09-10
2
+
3
+ ### Bugfixes
4
+
5
+ - Fix multiline input navigation and joining lines with Backspace
6
+
1
7
  ## [7.8.0] - 2026-08-10
2
8
 
3
9
  ### Additions
pytermgui/__init__.py CHANGED
@@ -40,7 +40,7 @@ if "-m" in sys.argv: # pragma: no cover
40
40
 
41
41
  warnings.filterwarnings("ignore")
42
42
 
43
- __version__ = "7.8.0"
43
+ __version__ = "7.8.1"
44
44
 
45
45
 
46
46
  def auto(data: Any, **widget_args: Any) -> Optional[Widget | list[Splitter]]:
@@ -178,6 +178,15 @@ class InputField(Widget): # pylint: disable=too-many-instance-attributes
178
178
 
179
179
  line = self._lines[row]
180
180
 
181
+ if col == 0 and row > 0 and count == 1:
182
+ previous = self._lines[row - 1]
183
+ self._lines[row - 1] = previous + line
184
+ self._lines.pop(row)
185
+ self.move_cursor((row - 1, len(previous)), absolute=True)
186
+ self._styled_cache = None
187
+
188
+ return "\n"
189
+
181
190
  start, end = sorted([col, col - count])
182
191
  start = max(0, start)
183
192
  self._lines[row] = line[:start] + line[end:]
@@ -435,7 +444,6 @@ class InputField(Widget): # pylint: disable=too-many-instance-attributes
435
444
  row, col = self.cursor
436
445
 
437
446
  line = self._lines[row]
438
- width = len(line)
439
447
 
440
448
  # Going left, possibly upwards
441
449
  if col < 0:
@@ -445,17 +453,17 @@ class InputField(Widget): # pylint: disable=too-many-instance-attributes
445
453
  else:
446
454
  self.cursor.row -= 1
447
455
  line = self._lines[self.cursor.row]
448
- self.cursor.col = width
456
+ self.cursor.col = len(line)
449
457
 
450
458
  # Going right, possibly downwards
451
- elif col > width and line != "":
459
+ elif col > len(line) and line != "":
452
460
  if len(self._lines) > row + 1:
453
461
  self.cursor.row += 1
454
462
  self.cursor.col = 0
455
463
 
456
464
  line = self._lines[self.cursor.row]
457
465
 
458
- self.cursor.col = max(0, min(self.cursor.col, width))
466
+ self.cursor.col = max(0, min(self.cursor.col, len(line)))
459
467
 
460
468
  def get_lines(self) -> list[str]:
461
469
  """Builds the input field's lines."""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PyTermGUI
3
- Version: 7.8.0
3
+ Version: 7.8.1
4
4
  Summary: Python TUI framework with mouse support, modular widget system, customizable and rapid terminal markup language and more!
5
5
  Project-URL: homepage, https://github.com/bczsalba/PyTermGUI
6
6
  Project-URL: repository, https://github.com/bczsalba/PyTermGUI
@@ -107,7 +107,13 @@ on the emulator forwarding the requested events.
107
107
 
108
108
  ## Latest release
109
109
 
110
- ### [7.8.0] - 2026-08-10
110
+ ### [7.8.1] - 2026-09-10
111
+
112
+ ### Bugfixes
113
+
114
+ - Fix multiline input navigation and joining lines with Backspace
115
+
116
+ ## [7.8.0] - 2026-08-10
111
117
 
112
118
  ### Additions
113
119
 
@@ -1,6 +1,6 @@
1
- CHANGELOG.md,sha256=PCeBmthBhlfRpzA9Kgu-VkVgugDinBuuE7qNPtUnkUE,12619
1
+ CHANGELOG.md,sha256=yJWKb_21CDH9Dt7yWP_HzqxfSHkEsgtYqfFeUwOW99o,12725
2
2
  README.md,sha256=jSbGV2X2dy4yNdD6iS3WOJ7wdTs8Vvo607dyhB9_SiQ,6940
3
- pytermgui/__init__.py,sha256=XrxCXrWMStINkfDMVLib33m20fQSD_ir_-BPLm6F3YA,3708
3
+ pytermgui/__init__.py,sha256=TgzCCRst1q_ESQsc8jU9uycdb_xxxORj2m5QYxh3jRQ,3708
4
4
  pytermgui/animations.py,sha256=2vTxwuTsLLUbCawE365_r1x_Li7jg_IZYs9G7aDP2ec,9189
5
5
  pytermgui/ansi_interface.py,sha256=q8Tjd50xXEq_fnCJTe1ky5iHx0XTlyC26XNqtv5mJI0,19749
6
6
  pytermgui/cmd.py,sha256=UEJcTxGg_k-RzNOms03hDM5DC9JReTQCh1gj_Y95boI,26454
@@ -42,7 +42,7 @@ pytermgui/widgets/containers.py,sha256=0MX5i2yxmNA1U7qd5ab-6X-nYy08MRxObGghQBaQi
42
42
  pytermgui/widgets/fancy_repr.py,sha256=oDRdExG1Lz31svldlxqqZgPEXTopWHnLQmL-WQ4Flzs,958
43
43
  pytermgui/widgets/frames.py,sha256=nDwPJVZHk5dJ_Gj4xCOGdddhroDZrPuyqINn4lsxiuU,7950
44
44
  pytermgui/widgets/inline.py,sha256=TvKfduFz94LHNw4Pf5dsPDc5O_nGUbkrqqxG8s2MiHs,2794
45
- pytermgui/widgets/input_field.py,sha256=cGYkydqzBI139MO0Gd9JdchCLaXqPaPu-PjyBKBcoq8,15415
45
+ pytermgui/widgets/input_field.py,sha256=FC9WpmUX8VdGWGrLuHCbUotwwq6OJtXDQAaTX_JeFtw,15711
46
46
  pytermgui/widgets/keyboard_button.py,sha256=h6h0VxQFiRTZBm6S_Hb0_nCm-DXDanjrRRhSej4Jsac,1607
47
47
  pytermgui/widgets/pixel_matrix.py,sha256=kG6oeh9Sdq-cR7RFe3GuF8dxly-PfDDvGZbBLcEYVhM,6231
48
48
  pytermgui/widgets/slider.py,sha256=o3MjjdgG_L25k64l72vPsQj2ZfBP8AoMZ3TPUZXGEiQ,4523
@@ -53,8 +53,8 @@ pytermgui/window_manager/compositor.py,sha256=MWOzk4anbjbAuPnqIVxsebPGLOQBIjOgn3
53
53
  pytermgui/window_manager/layouts.py,sha256=LPnLfTYhHbVf43ZXe3LTo5JjAKErhxkiLy5iklcbv5w,11759
54
54
  pytermgui/window_manager/manager.py,sha256=BO3-isHdGzib0e4rKgUxAcqApWF1BzDNDKqEF1GAKCM,19897
55
55
  pytermgui/window_manager/window.py,sha256=h0n77MAs3f0PPKLLCGWhhLfjPpI4apirU2PW45TjiGE,9198
56
- pytermgui-7.8.0.dist-info/METADATA,sha256=YTaBDt_Mg7wtozR7WT4DRAjJKv5EF94z8s_baiuSeYg,7283
57
- pytermgui-7.8.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
58
- pytermgui-7.8.0.dist-info/entry_points.txt,sha256=_f8oS50EIgQ03FG2DFQZFfq7GeY7F9Z5PmNO9dcjwM4,43
59
- pytermgui-7.8.0.dist-info/licenses/LICENSE,sha256=m-Yvg2wbkEYgYdXj1NTqkVopaP2q_FWlg7Bv0p16mqg,1052
60
- pytermgui-7.8.0.dist-info/RECORD,,
56
+ pytermgui-7.8.1.dist-info/METADATA,sha256=soGcBqDYWGmdspJW8zk3xxD2rjal-JQdYWwesKi5laQ,7389
57
+ pytermgui-7.8.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
58
+ pytermgui-7.8.1.dist-info/entry_points.txt,sha256=_f8oS50EIgQ03FG2DFQZFfq7GeY7F9Z5PmNO9dcjwM4,43
59
+ pytermgui-7.8.1.dist-info/licenses/LICENSE,sha256=m-Yvg2wbkEYgYdXj1NTqkVopaP2q_FWlg7Bv0p16mqg,1052
60
+ pytermgui-7.8.1.dist-info/RECORD,,