jtilander / niftyplugins

Visual Studio productivity plugins
MIT License
40 stars 24 forks source link

Sometimes VS fires events for unamed items. #23

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Reported by Tim Burris:

Sometimes VS fires events for unnamed items, obviously invalid for passing
to P4 by name.
Fix: Added guard clauses to prevent events from queuing no-op commands. 
I've seen it happen for add operations only; the guard clauses apply to all
operations just in case.
Repro steps:
1.       Change a file

2.       Save it

3.       Revert it

The file gets reopened for edit.  This is because VS reloads the file and
sends vsTextChangedMultiLine when it the file changes.  This might only
repro on a p4 client with modtime (instead of the default nomodtime) set.
Fix: Added a check against ActiveDocument.Saved in the OnLineChanged
handler.  Note that this does not affect the paste case because Saved is
false when VS fires OnLineChanged during a paste operation.

Original issue reported on code.google.com by jim.tila...@gmail.com on 15 Sep 2008 at 6:14

GoogleCodeExporter commented 9 years ago

Original comment by jim.tila...@gmail.com on 15 Sep 2008 at 6:15

Attachments:

GoogleCodeExporter commented 9 years ago
(The patch also contains this feature)

New feature:

Added the ability to check out open files that are not part of the solution on 
save
(using m_application.ActiveDocument for SaveSelected, and 
m_application.Documents for
SaveAll)

Original comment by jim.tila...@gmail.com on 15 Sep 2008 at 6:16

GoogleCodeExporter commented 9 years ago

Original comment by jim.tila...@gmail.com on 15 Sep 2008 at 6:16

GoogleCodeExporter commented 9 years ago
Took the check for Saved and integrated it into the current code.

Original comment by jim.tila...@gmail.com on 30 Apr 2009 at 5:56

GoogleCodeExporter commented 9 years ago

Original comment by jim.tila...@gmail.com on 30 Apr 2009 at 8:01