Display name
Enrico Forestieri
forenr at lyx.org
Fri Dec 22 09:20:41 UTC 2023
In order to distinguish files with same name but located in different
directories LyX displays the complete path. However, some window
managers truncate such paths so that different files cannot be
distinguished if they are in the same directory and their path is long.
The attached patch follows the same strategy of gvim, i.e., display the
file name first and then the path enclosed in paranthesis.
--
Enrico
-------------- next part --------------
diff --git a/src/support/FileName.cpp b/src/support/FileName.cpp
index 7fbd2f4b4c..864f38770c 100644
--- a/src/support/FileName.cpp
+++ b/src/support/FileName.cpp
@@ -748,7 +748,8 @@ docstring const FileName::absoluteFilePath() const
docstring FileName::displayName(int threshold) const
{
- return makeDisplayPath(absFileName(), threshold);
+ return from_utf8(onlyFileName()) + " ("
+ + makeDisplayPath(onlyPath().absFileName(), threshold) + ")";
}
More information about the lyx-devel
mailing list