Skip to content

Commit 3336d6d

Browse files
committed
Added argument force to method Update.
1 parent dffc537 commit 3336d6d

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/GtmExtension/GtmPackage.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,12 +228,13 @@ private void Caret_PositionChanged(object sender, CaretPositionChangedEventArgs
228228
}
229229
private void DocumentEvents_DocumentSaved(Document Document)
230230
{
231-
Update(Document.FullName);
231+
Update(Document.FullName, force: true);
232232
}
233-
private void Update(string path)
233+
private void Update(string path, bool force = false)
234234
{
235235
var time = DateTime.Now;
236-
if (time - lastUpdate >= updateInterval ||
236+
if (force ||
237+
time - lastUpdate >= updateInterval ||
237238
path != prevPath)
238239
{
239240
status = ExecuteForOutput(gtmExe, $"record --status \"{path}\"");

0 commit comments

Comments
 (0)