Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions FileHeader.py
Original file line number Diff line number Diff line change
Expand Up @@ -601,13 +601,15 @@ def update_automatically(self, view, what):
if search is not None:
var = search.group()
index = line.find(var)

line_header = None

for i in range(index - 1, 0, -1):
if line[i] != ' ':
space_start = i + 1
line_header = line[:space_start]
break

if line_header is None:
return
line_header = re.escape(line_header)
if what == LAST_MODIFIED_BY or what == FILE_NAME or \
what == FILE_NAME_WITHOUT_EXTENSION or \
Expand Down