jed-users mailing list

[2003 Date Index] [2003 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

disable cursor vertical centering after sw2buf


hi!
as you might have guessed from the subject, i don't want the
cursorposition vertically centered in the buffer after switching away and
coming back via a switching function (see below).

an example:
the cursor position is about 3/4 (line 60) of the window. after switching for- and
backwards the cursor is at 1/2 (line 40) of the window. the content is scrolled
accordingly, i.e. 20 less on top of the cursor and 20 lines are scrolled
in from the bottom.

i want to make the cursor stay at 3/4 (line 60) without scrolling anything.

do i have to implement this via create_user_mark() and companions or is
there a simpler way to do this?

i'm using the following function to switch "windows":
define next_buffer (previous)
{
   variable n, buf, file, str = "";
   n = buffer_list ();
   if (previous)
     _stk_reverse (n-1);
   loop (n) {
      buf = ();
      n--;
      if (buf[0] == ' ') continue;
      if (buf[0] == '*') continue; % don't show up *..-windows
      sw2buf (buf);
      _pop_n (n);
      return;
   }
}


thanks,
		 christian


--------------------------
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]