Skip to content

Commit

Permalink
Increase the number of lines where filename is replaced upon save as
Browse files Browse the repository at this point in the history
Search the first 4 lines (instead of 3) for Python templates support.
  • Loading branch information
b4n committed Mar 5, 2013
1 parent 5b23669 commit e5245eb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion doc/geany.txt
Expand Up @@ -4782,7 +4782,7 @@ geanyversion The actual Geany version, e.g. file templates, fil

filename The filename of the current file. file header, snippets, file
For new files, it's only replaced when templates.
first saving if found on the first 3 lines
first saving if found on the first 4 lines
of the file.

project The current project's name, if any. file header, snippets, file templates.
Expand Down
2 changes: 1 addition & 1 deletion src/document.c
Expand Up @@ -1372,7 +1372,7 @@ static void replace_header_filename(GeanyDocument *doc)

/* only search the first 3 lines */
ttf.chrg.cpMin = 0;
ttf.chrg.cpMax = sci_get_position_from_line(doc->editor->sci, 3);
ttf.chrg.cpMax = sci_get_position_from_line(doc->editor->sci, 4);
ttf.lpstrText = filebase;

if (search_find_text(doc->editor->sci, SCFIND_MATCHCASE | SCFIND_REGEXP, &ttf) != -1)
Expand Down

0 comments on commit e5245eb

Please sign in to comment.