Skip to content

Commit

Permalink
Show the warning highlight in the correct places in 8.7
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle Stemen authored and Kyle Stemen committed Oct 30, 2017
1 parent 1c93b1f commit 1f7faaf
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions autoload/coqtop.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,10 @@ def parse_feedback(self, xml):
if xml.get("object") == "state":
state_id = parse_value(xml.find("state_id"))
comm = self.get_command_by_state_id(state_id)
if comm is None:
# coqtop must be sending feedback for a statement before it
# sent a reply to the Add command.
comm = self.get_command_by_state_id(None)
else:
edit_id = parse_value(xml.find("edit_id"))
comm = self.get_command_by_edit(edit_id)
Expand All @@ -318,9 +322,11 @@ def parse_feedback(self, xml):
level = level.get("val")
if level == "error":
level = Command.ERROR
else:
elif level == "warning":
level = Command.WARNING
if comm:
else:
level = Command.NONE
if comm and level != Command.NONE:
comm.msg_type = level
# The element type is option
if messageNode[1].get("val") == "some":
Expand Down

0 comments on commit 1f7faaf

Please sign in to comment.