mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-15 21:55:52 +08:00
Fix the fax value
This commit is contained in:
parent
a4615fd729
commit
cec022f330
@ -54,11 +54,9 @@ class Diagnostic:
|
|||||||
with open(self.file, "r") as f:
|
with open(self.file, "r") as f:
|
||||||
self._lines = f.readlines()
|
self._lines = f.readlines()
|
||||||
|
|
||||||
start_line = self.location["start"]["line"]
|
start_line = self.location["start"]["line"] - 1
|
||||||
start_col = self.location["start"]["col"]
|
end_line = self.location["end"]["line"] - 1
|
||||||
end_line = self.location["end"]["line"]
|
self._content_block = "\n".join(self._lines[start_line:end_line])
|
||||||
end_col = len(self._lines[start_line:end_line - 1]) + self.location["start"]["col"]
|
|
||||||
self._content_block = "".join(self._lines[start_line:end_line])
|
|
||||||
return self._content_block
|
return self._content_block
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@ -73,10 +71,10 @@ class Diagnostic:
|
|||||||
with open(self.file, "r") as f:
|
with open(self.file, "r") as f:
|
||||||
self._lines = f.readlines()
|
self._lines = f.readlines()
|
||||||
|
|
||||||
start_line = self.location["start"]["line"]
|
start_line = self.location["start"]["line"] - 2
|
||||||
start_col = self.location["start"]["col"]
|
start_col = 0
|
||||||
end_line = self.location["end"]["line"]
|
end_line = self.location["end"]["line"] - 1
|
||||||
end_col = len(self._lines[start_line:end_line - 1]) + self.location["start"]["col"]
|
end_col = len(self._lines[start_line:end_line - 1]) + self.location["start"]["col"] - 4 # TODO: double check if 4 holds in all instances
|
||||||
self._fix = self.content_block[start_col:end_col]
|
self._fix = self.content_block[start_col:end_col]
|
||||||
return self._fix
|
return self._fix
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user