editor: Show a normalized path in header bar
- This generally keeps the path as given but simplifies it if possible.
This commit is contained in:
parent
a4b9c4f61f
commit
f8a3fc0bff
1 changed files with 3 additions and 2 deletions
|
|
@ -5,6 +5,7 @@
|
|||
import asyncio
|
||||
import contextlib
|
||||
import functools
|
||||
import os
|
||||
import string
|
||||
import sys
|
||||
|
||||
|
|
@ -184,7 +185,7 @@ class Editor:
|
|||
for style in ["monokai", "fruity", "native"]] + [None]
|
||||
|
||||
def __init__(self, text="", path="Untitled"):
|
||||
self.path = path
|
||||
self.path = os.path.normpath(path)
|
||||
self.set_text(text)
|
||||
self.mark = None
|
||||
self.clipboard = None
|
||||
|
|
@ -257,7 +258,7 @@ class Editor:
|
|||
pass
|
||||
|
||||
def load(self, path):
|
||||
self.path = path
|
||||
self.path = os.path.normpath(path)
|
||||
with open(path) as file_:
|
||||
self.set_text(file_.read())
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue