Permalink
Browse files

Increase the number of lines where filename is replaced upon save as

Search the first 4 lines (instead of 3) for Python templates support.
  • Loading branch information...
1 parent 5b23669 commit e5245eb053cd02b72827de41f7509512fcbc551c @b4n b4n committed Mar 5, 2013
Showing with 2 additions and 2 deletions.
  1. +1 −1 doc/geany.txt
  2. +1 −1 src/document.c
View
@@ -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.
View
@@ -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)

0 comments on commit e5245eb

Please sign in to comment.