@@ -278,6 +278,7 @@ class Gutter{
278
278
279
279
var textNode = element . childNodes [ 0 ] ;
280
280
var foldWidget = element . childNodes [ 1 ] ;
281
+ var annotationNode = element . childNodes [ 2 ] ;
281
282
282
283
var firstLineNumber = session . $firstLineNumber ;
283
284
@@ -287,7 +288,27 @@ class Gutter{
287
288
var foldWidgets = this . $showFoldWidgets && session . foldWidgets ;
288
289
var foldStart = fold ? fold . start . row : Number . MAX_VALUE ;
289
290
290
- var className = "ace_gutter-cell " ;
291
+ var lineHeight = config . lineHeight + "px" ;
292
+
293
+ var className ;
294
+ if ( this . $useSvgGutterIcons ) {
295
+ className = "ace_gutter-cell_svg-icons " ;
296
+
297
+ if ( this . $annotations [ row ] ) {
298
+ annotationNode . className = "ace_icon_svg" + this . $annotations [ row ] . className ;
299
+
300
+ dom . setStyle ( annotationNode . style , "height" , lineHeight ) ;
301
+ dom . setStyle ( annotationNode . style , "display" , "block" ) ;
302
+ }
303
+ else {
304
+ dom . setStyle ( annotationNode . style , "display" , "none" ) ;
305
+ }
306
+ }
307
+ else {
308
+ className = "ace_gutter-cell " ;
309
+ dom . setStyle ( annotationNode . style , "display" , "none" ) ;
310
+ }
311
+
291
312
if ( this . $highlightGutterLine ) {
292
313
if ( row == this . $cursorRow || ( fold && row < this . $cursorRow && row >= foldStart && this . $cursorRow <= fold . end . row ) ) {
293
314
className += "ace_gutter-active-line " ;
@@ -324,8 +345,7 @@ class Gutter{
324
345
if ( foldWidget . className != className )
325
346
foldWidget . className = className ;
326
347
327
- var foldHeight = config . lineHeight + "px" ;
328
- dom . setStyle ( foldWidget . style , "height" , foldHeight ) ;
348
+ dom . setStyle ( foldWidget . style , "height" , lineHeight ) ;
329
349
dom . setStyle ( foldWidget . style , "display" , "inline-block" ) ;
330
350
} else {
331
351
if ( foldWidget ) {
@@ -415,6 +435,9 @@ function onCreateCell(element) {
415
435
416
436
var foldWidget = dom . createElement ( "span" ) ;
417
437
element . appendChild ( foldWidget ) ;
438
+
439
+ var annotationNode = dom . createElement ( "span" ) ;
440
+ element . appendChild ( annotationNode ) ;
418
441
419
442
return element ;
420
443
}
0 commit comments