- Subject: Re: Split windows problem with xjed (-84)?
- From: "John E. Davis" <davis@xxxxxxxxxxxxx>
- Date: Thu, 7 Apr 2005 10:32:26 -0400
Romano Giannetti <romanol@xxxxxxx> wrote:
> I am seeing a strange effect when working in split windows in xjed
> (99.17-84). It's faster if I show you an image:
I am sure that this is related to the line number problem that was
reported earlier. Turning off the display of line/column numbers on
the modeline is a work-around. Appended is the patch that will appear
in the next development release. Thanks, --John
--- jed-B0.99-17.84/src/screen.c Wed Mar 23 12:23:33 2005
+++ screen.c Fri Mar 25 15:00:19 2005
@@ -555,7 +555,7 @@
#if SLANG_VERSION >= 20000
-static void init_smg_for_buffer (void)
+static void init_smg_for_buffer (int *rowp, int *colp)
{
SLsmg_Tab_Width = Buffer_Local.tab;
if (IS_MINIBUFFER)
@@ -563,14 +563,17 @@
else
SLsmg_Newline_Behavior = 0;
(void) SLsmg_embedded_escape_mode (CBuf->flags & SMG_EMBEDDED_ESCAPE);
+
+ *rowp = SLsmg_get_row ();
+ *colp = SLsmg_get_column ();
SLsmg_gotorc (0, 0);
}
void point_column (int n)
{
SLuchar_Type *p, *pmax;
+ int row, col;
- init_smg_for_buffer ();
/* Compensate for the prompt */
if (IS_MINIBUFFER)
@@ -581,13 +584,19 @@
if (LINE_HAS_NEWLINE (CLine))
pmax--;
+ init_smg_for_buffer (&row, &col);
n = (int) SLsmg_strbytes (p, pmax, (unsigned int) n);
+ SLsmg_gotorc (row, col);
+
jed_set_point (n);
}
int jed_compute_effective_length (unsigned char *pos, unsigned char *pmax)
{
- init_smg_for_buffer ();
- return (int) SLsmg_strwidth (pos, pmax);
+ int len, row, col;
+ init_smg_for_buffer (&row, &col);
+ len = (int) SLsmg_strwidth (pos, pmax);
+ SLsmg_gotorc (row, col);
+ return len;
}
#else
--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.
[2005 date index]
[2005 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]