- Subject: L4J: Bug in l_i_pair_around_region()
- From: Joerg Sommer <joerg@xxxxxxxxxxxx>
- Date: Sun, 1 Jun 2003 13:41:20 +0000 (UTC)
Hi,
if I set my mark backward, latex_insert_pair_around_region() is somewhat
confused and inserts me the text exchanged. For example: insert("Test");
push_mark(); left(4); latex_cmd("underline", 1);
#v+
--- /home/joerg/.jed/latex.sl.orig 2003-05-22 00:00:41.000000000 +0200
+++ /home/joerg/.jed/latex.sl 2003-06-01 15:27:52.000000000 +0200
@@ -616,8 +665,21 @@
static define latex_insert_pair_around_region (left, right)
{
+ variable line = what_line(), col = what_column();
+
exchange_point_and_mark ();
- insert (left);
+ if ( what_line() < line )
+ insert (left);
+ else if ( what_line() > line ) {
+ insert(right);
+ right = left;
+ } else if ( what_column() < col )
+ insert(left);
+ else {
+ insert(right);
+ right = left;
+ }
+
exchange_point_and_mark ();
insert (right);
pop_spot ();
#v-
Joerg.
--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.
[2003 date index]
[2003 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]