aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ioview.cpp
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2015-03-07 16:53:02 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2015-03-07 16:53:02 +0100
commita3a340a9e9e1856a46c079186354f163cfc5febc (patch)
treeba1bb6423431a8aa2804113140f30f9676a5a33d /src/ioview.cpp
parent80bc1c0716e0ba7f9ebc89670576f6fe558d3d53 (diff)
downloadsciteco-a3a340a9e9e1856a46c079186354f163cfc5febc.tar.gz
fixed TAB completion of files in the current directory beginning with "."
We used g_path_get_dirname() which does not always return strict prefixes of the input file name. For file names without directory, it returns "." (the current directory). This is useful for passing that directory to functions expecting a proper directory (like g_dir_open()) but was unsuitable for building file name candidates for autocompletion. Therefore, we tried to determine if the dirname is a prefix of the filename. This however failed for "hidden" file names beginning with dot. All in all it is easier to calculate our own directory name based on the previously calculated basename than to handle the current-directory case with g_path_get_dirname(). Now we'll get "" for the current directory, so we have to handle the empty-string-is-current-dir case.
Diffstat (limited to 'src/ioview.cpp')
0 files changed, 0 insertions, 0 deletions