src/Tools/jEdit/src/rich_text_area.scala
changeset 56550 b26bdc1f96e5
parent 56497 0c63f3538639
child 56551 d4da2b11c729
equal deleted inserted replaced
56549:7cfc7aa121f3 56550:b26bdc1f96e5
   314               for (x1 <- Range(x0, x0 + r.length, 2)) {
   314               for (x1 <- Range(x0, x0 + r.length, 2)) {
   315                 val y1 = if (x1 % 4 < 2) y0 else y0 + 1
   315                 val y1 = if (x1 % 4 < 2) y0 else y0 + 1
   316                 gfx.drawLine(x1, y1, x1 + 1, y1)
   316                 gfx.drawLine(x1, y1, x1 + 1, y1)
   317               }
   317               }
   318             }
   318             }
       
   319 
       
   320             // spell-checker
       
   321             for {
       
   322               spell_checker <- PIDE.get_spell_checker
       
   323               range0 <- rendering.prose_words(line_range).iterator
       
   324               text <- JEdit_Lib.try_get_text(buffer, range0)
       
   325               range <- spell_checker.bad_words(text)
       
   326               r <- JEdit_Lib.gfx_range(text_area, range + range0.start)
       
   327             } {
       
   328               gfx.setColor(rendering.spell_checker_color)
       
   329               val y0 = r.y + fm.getAscent + 2
       
   330               gfx.drawLine(r.x, y0, r.x + r.length, y0)
       
   331             }
   319           }
   332           }
   320         }
   333         }
   321       }
   334       }
   322     }
   335     }
   323   }
   336   }