@@ -381,7 +381,14 @@ define(function (require, exports, module) {
381381
382382 $problemsPanel . find ( ".title" ) . text ( message ) ;
383383 tooltip = StringUtils . format ( Strings . STATUSBAR_CODE_INSPECTION_TOOLTIP , message ) ;
384- StatusBar . updateIndicator ( INDICATOR_ID , true , "inspection-errors" , tooltip ) ;
384+ let iconType = "inspection-errors" ;
385+ if ( documentFixes . size ) {
386+ tooltip = StringUtils . format ( Strings . STATUSBAR_CODE_INSPECTION_TOOLTIP_WITH_FIX ,
387+ documentFixes . size , message ) ;
388+ iconType = "inspection-repair" ;
389+ }
390+
391+ StatusBar . updateIndicator ( INDICATOR_ID , true , iconType , tooltip ) ;
385392 }
386393
387394 function _getMarkOptions ( error ) {
@@ -503,6 +510,8 @@ define(function (require, exports, module) {
503510 let codeInspectionMarks = editor . findMarksAt ( pos , CODE_MARK_TYPE_INSPECTOR ) || [ ] ;
504511 let $hoverMessage = $ ( `<div class="code-inspection-item"></div>` ) ;
505512 let $problemView , quickViewPresent ;
513+ let startPos = { line : pos . line , ch : token . start } ,
514+ endPos = { line : pos . line , ch : token . end } ;
506515 for ( let mark of codeInspectionMarks ) {
507516 quickViewPresent = true ;
508517 const fixID = `${ mark . metadata } ` ;
@@ -525,11 +534,24 @@ define(function (require, exports, module) {
525534 toggleCollapsed ( false ) ;
526535 _scrollToTableLine ( pos . line ) ;
527536 } ) ;
537+ const markPos = mark . find ( ) ;
538+ if ( markPos . from && markPos . from . line < startPos . line ) {
539+ startPos . line = markPos . from . line ;
540+ }
541+ if ( markPos . from && markPos . from . ch < startPos . ch ) {
542+ startPos . ch = markPos . from . ch ;
543+ }
544+ if ( markPos . to && markPos . to . line > endPos . line ) {
545+ endPos . line = markPos . to . line ;
546+ }
547+ if ( markPos . to && markPos . to . ch > endPos . ch ) {
548+ endPos . ch = markPos . to . ch ;
549+ }
528550 }
529551 if ( quickViewPresent ) {
530552 resolve ( {
531- start : { line : pos . line , ch : token . start } , // tod this should not be of the token
532- end : { line : pos . line , ch : token . end } ,
553+ start : startPos ,
554+ end : endPos ,
533555 content : $hoverMessage
534556 } ) ;
535557 return ;
0 commit comments