Skip to content

Commit

Permalink
add initial_selection
Browse files Browse the repository at this point in the history
  • Loading branch information
predragnikolic committed Jun 26, 2024
1 parent d1a10cf commit 08e3af1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plugin/rename_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ def placeholder(self) -> str:
def initial_text(self) -> str:
return self.placeholder()

def initial_selection(self) -> list[tuple[int, int]]:
end_point = self.file_name.rfind('.')
return [(0, end_point)]

def validate(self, name: str) -> bool:
return len(name) > 0

Expand Down

0 comments on commit 08e3af1

Please sign in to comment.