File tree Expand file tree Collapse file tree 3 files changed +13
-4
lines changed
Expand file tree Collapse file tree 3 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,11 @@ All notable changes to the "cpplint" extension will be documented in this file.
33
44Check [ Keep a Changelog] ( http://keepachangelog.com/ ) for recommendations on how to structure this file.
55
6+ ## [ 0.1.2]
7+ ### Change
8+
9+ - fix cpplint in 500ms when setting and save happened to avoid large file freeze
10+
611## [ 0.1.0]
712### Change
813
Original file line number Diff line number Diff line change 22 "name" : " cpplint" ,
33 "displayName" : " cpplint" ,
44 "description" : " code style check tool extension for cpplint" ,
5- "version" : " 0.1.1 " ,
5+ "version" : " 0.1.2 " ,
66 "publisher" : " mine" ,
77 "repository" : {
88 "type" : " Git" ,
Original file line number Diff line number Diff line change @@ -101,12 +101,16 @@ function startLint() {
101101 timer = global . setTimeout ( doLint , 1.5 * 1000 ) ;
102102}
103103
104+ function startLint2 ( ) {
105+ timer = global . setTimeout ( doLint , 500 ) ;
106+ }
107+
104108function loadConfigure ( ) {
105109 ConfigManager . getInstance ( ) . initialize ( ) ;
106110 if ( ConfigManager . getInstance ( ) . isSingleMode ( ) ) {
107- doLint ( ) ;
108- vscode . window . onDidChangeActiveTextEditor ( ( ( ) => doLint ( ) ) . bind ( this ) ) ;
109- vscode . workspace . onDidSaveTextDocument ( ( ( ) => doLint ( ) ) . bind ( this ) ) ;
111+ startLint2 ( ) ;
112+ vscode . window . onDidChangeActiveTextEditor ( ( ( ) => startLint2 ( ) ) . bind ( this ) ) ;
113+ vscode . workspace . onDidSaveTextDocument ( ( ( ) => startLint2 ( ) ) . bind ( this ) ) ;
110114 } else {
111115 // start timer to do workspace lint
112116 startLint ( ) ;
You can’t perform that action at this time.
0 commit comments