Skip to content

Commit

Permalink
refactor: use tcurses window object when applicable
Browse files Browse the repository at this point in the history
  • Loading branch information
mecaneer23 committed Mar 13, 2024
1 parent 7d81cad commit 7de51d4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/cursor_movement.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@
Various ways to move a cursor represented by an int
"""

from curses import window

from src.class_todo import Todos
from src.get_args import TKINTER_GUI
from src.keys import Key
from src.utils import clamp

if TKINTER_GUI:
from src.tcurses import window
else:
from curses import window


def _cursor_to(position: int, len_todos: int) -> int:
return clamp(position, 0, len_todos)
Expand Down

0 comments on commit 7de51d4

Please sign in to comment.