[PATCH] orgmode: fix org_scan_chunk in headings

François Revol <[email protected]> Fri, 10 Jan 2014 15:20:57 +0100
Newsgroups gmane.editors.qemacs.devel
Message-ID <[email protected]>
Hi Charlie,
nice to see you work on orgmode :)
I actually noticed some things didn't know about it ;-)

When called on a heading org_scan_chunk didn't work because the previous
character already has a style and thus can't be just a space char.

François.

_______________________________________________
Qemacs-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/qemacs-devel
qemacs-orgmode-002.diff (text/x-patch, 453 B)
Index: orgmode.c
===================================================================
RCS file: /sources/qemacs/qemacs/orgmode.c,v
retrieving revision 1.4
diff -u -r1.4 orgmode.c
--- orgmode.c	10 Jan 2014 14:00:08 -0000	1.4
+++ orgmode.c	10 Jan 2014 14:17:17 -0000
@@ -124,7 +124,7 @@
 {
     int i = i0, j;
 
-    if (i > 0 && str[i - 1] != ' ')
+    if (i > 0 && (str[i - 1] & CHAR_MASK) != ' ')
         return 0;
 
     for (j = 0; begin[j]; j++) {