# HG changeset patch
# User Andrey Skvortsov <andrej.skvortzov@gmail.com>
# Date 1473083254 -10800
# Node ID e44950d4c2182906063a265092370ffdbf7d3d03
# Parent  6addc58f63a623b0ef946b71f8017e51bed48376
fix highlighting input/outputs in function call in ST, if comment section is placed
inside call.

For example:

PackOutputs(
     W4 := OUT1,
     W5 := OUT2,
     W6 := OUT3,
     W7 := OUT4,
     W8 := OUT5 (* comment inside call *),
     W9 := OUT6,
     W10 := OUT7,
     W11 := OUT8);

diff -r 6addc58f63a6 -r e44950d4c218 editors/TextViewer.py
--- a/editors/TextViewer.py	Wed Aug 24 13:08:13 2016 +0300
+++ b/editors/TextViewer.py	Mon Sep 05 16:47:34 2016 +0300
@@ -629,6 +629,10 @@
                     self.SetStyling(current_pos - last_styled_pos + 2, STC_PLC_COMMENT)
                     last_styled_pos = current_pos + 1
                     state = SPACE
+                    if len(self.CallStack) > 0:
+                        current_call = self.CallStack.pop()
+                    else:
+                        current_call = None                    
             elif state == PRAGMA:
                 if line.endswith("}"):
                     self.SetStyling(current_pos - last_styled_pos, STC_PLC_EMPTY)