summary refs log tree commit diff stats
path: root/compiler/options.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/options.nim')
-rw-r--r--compiler/options.nim6
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/options.nim b/compiler/options.nim
index a7d513dc5..3b71dca47 100644
--- a/compiler/options.nim
+++ b/compiler/options.nim
@@ -106,10 +106,16 @@ var
   gLastCmdTime*: float        # when caas is enabled, we measure each command
   gListFullPaths*: bool
   isServing*: bool = false
+  gDirtyBufferIdx* = 0'i32    # indicates the fileIdx of the dirty version of
+                              # the tracked source X, saved by the CAAS client.
+  gDirtyOriginalIdx* = 0'i32  # the original source file of the dirtified buffer.
 
 proc importantComments*(): bool {.inline.} = gCmd in {cmdDoc, cmdIdeTools}
 proc usesNativeGC*(): bool {.inline.} = gSelectedGC >= gcRefc
 
+template isWorkingWithDirtyBuffer*: expr =
+  gDirtyBufferIdx != 0
+
 template compilationCachePresent*: expr =
   {optCaasEnabled, optSymbolFiles} * gGlobalOptions != {}