Show relative paths in diff filename tags.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3951 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
parent
a6a847f4e7
commit
746a8d5834
@ -5,6 +5,8 @@
|
||||
scrolling with the arrow keys.
|
||||
* src/keybindings.c, src/keybindings.h, src/search.c, src/search.h:
|
||||
Add 'Mark All' keybinding.
|
||||
* tagmanager/diff.c:
|
||||
Show relative paths in diff filename tags.
|
||||
|
||||
|
||||
2009-07-09 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
|
||||
|
@ -43,13 +43,17 @@ static void findDiffTags (void)
|
||||
while ((line = fileReadLine ()) != NULL)
|
||||
{
|
||||
const unsigned char* cp = line;
|
||||
boolean skipSlash = TRUE;
|
||||
boolean skipSlash = FALSE;
|
||||
|
||||
if (strncmp((const char*) cp, "--- ", (size_t) 4) == 0)
|
||||
{
|
||||
cp += 4;
|
||||
if (isspace ((int) *cp)) continue;
|
||||
|
||||
/* strip any absolute path */
|
||||
if (*cp == '/' || *cp == '\\')
|
||||
{
|
||||
skipSlash = TRUE;
|
||||
tmp = (const unsigned char*) strrchr((const char*) cp, '/');
|
||||
if (tmp == NULL)
|
||||
{ /* if no / is contained try \ in case of a Windows filename */
|
||||
@ -63,6 +67,10 @@ static void findDiffTags (void)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
tmp = cp;
|
||||
|
||||
if (tmp != NULL)
|
||||
{
|
||||
if (skipSlash) tmp++; /* skip the leading slash or backslash */
|
||||
|
Loading…
x
Reference in New Issue
Block a user