mirror of
https://github.com/neovim/neovim.git
synced 2025-12-06 22:52:42 +00:00
Introduce nvim namespace: Fix clint.
- Fix path to clint-checked files. - Fix mechanism to calculate define guard names.
This commit is contained in:
4
clint.py
4
clint.py
@@ -627,7 +627,7 @@ class FileInfo:
|
||||
return os.path.abspath(self._filename).replace('\\', '/')
|
||||
|
||||
def RelativePath(self):
|
||||
"""FullName with /home/julian/c/neovim/src/ chopped off."""
|
||||
"""FullName with <prefix>/src/nvim/ chopped off."""
|
||||
fullname = self.FullName()
|
||||
|
||||
if os.path.exists(fullname):
|
||||
@@ -639,7 +639,7 @@ class FileInfo:
|
||||
root_dir = os.path.dirname(root_dir)
|
||||
|
||||
if os.path.exists(os.path.join(root_dir, ".git")):
|
||||
root_dir = os.path.join(root_dir, "src")
|
||||
root_dir = os.path.join(root_dir, "src", "nvim")
|
||||
prefix = os.path.commonprefix([root_dir, project_dir])
|
||||
return fullname[len(prefix) + 1:]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user