diff --git a/dirutil.py b/dirutil.py index 21594d7..1b76d2f 100644 --- a/dirutil.py +++ b/dirutil.py @@ -3,10 +3,8 @@ from point import Point def resolve_token(w, y=None): if y is None: - p = Point(0, w.logical_cursor().y) - else: - p = Point(0, y) - return w.get_next_token_by_type(p, 'dir_name') + y = w.logical_cursor().y + return w.get_next_token_by_type(Point(0, y), 'name') def resolve_name(w, y=None): t = resolve_token(w, y) assert t is not None