aboutsummaryrefslogtreecommitdiff
path: root/devel/charva/files/patch-java_src_charvax_swing_JTextArea.java
blob: cfff4704fae8e74d077837ee4ec0a20a25d10d3b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
--- java/src/charvax/swing/JTextArea.java.orig	2016-06-20 12:40:44 UTC
+++ java/src/charvax/swing/JTextArea.java
@@ -412,6 +412,10 @@ public class JTextArea
         Point tempCaret = null;
         Point caret = _caret;
 
+        int attrib = 0;
+        if (_bold)
+            attrib |= Toolkit.A_BOLD;
+
         /* Get the absolute origin of this component.
          */
         Point origin = getLocationOnScreen();
@@ -458,7 +462,7 @@ public class JTextArea
                             _rows++;
                         term.setCursor(origin.addOffset(col, row));
                     } else {
-                        term.addChar(chr, 0, colorpair);
+                        term.addChar(chr, attrib, colorpair);
                         col++;
                     }
                 } else {	// We have reached the right-hand column.
@@ -470,7 +474,7 @@ public class JTextArea
                                 _rows++;
                             term.setCursor(origin.addOffset(col, row));
                         } else {
-                            term.addChar(chr, 0, colorpair);
+                            term.addChar(chr, attrib, colorpair);
                             col++;
                             _columns++;
                         }
@@ -482,7 +486,7 @@ public class JTextArea
                                 _rows++;
                             term.setCursor(origin.addOffset(col, row));
                             if (chr != '\n')    // thanks to Chris Rogers for this
-                                term.addChar(chr, 0, colorpair);
+                                term.addChar(chr, attrib, colorpair);
                         } else {
                             /* We must back-track until we get to whitespace, so
                              * that we can move the word to the next line.