From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.help Subject: Re: Scrolling jumpy when line-spacing > 0 Date: Fri, 21 Apr 2017 18:03:43 +0700 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1492783092 11726 195.159.176.226 (21 Apr 2017 13:58:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 21 Apr 2017 13:58:12 +0000 (UTC) To: "help-gnu-emacs@gnu.org" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Apr 21 15:58:06 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d1Z4V-0002re-H9 for geh-help-gnu-emacs@m.gmane.org; Fri, 21 Apr 2017 15:58:03 +0200 Original-Received: from localhost ([::1]:59806 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d1Z4b-0005CV-3S for geh-help-gnu-emacs@m.gmane.org; Fri, 21 Apr 2017 09:58:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34149) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d1WMA-0000ZX-BI for help-gnu-emacs@gnu.org; Fri, 21 Apr 2017 07:04:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d1WM9-0007VG-EV for help-gnu-emacs@gnu.org; Fri, 21 Apr 2017 07:04:06 -0400 Original-Received: from mail-wm0-x233.google.com ([2a00:1450:400c:c09::233]:35133) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d1WM9-0007Uw-7E for help-gnu-emacs@gnu.org; Fri, 21 Apr 2017 07:04:05 -0400 Original-Received: by mail-wm0-x233.google.com with SMTP id w64so13079914wma.0 for ; Fri, 21 Apr 2017 04:04:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:content-transfer-encoding; bh=bPlvp8sPSyhH+qXlqqVSkQARx1bZr6S90hrO+7RY6w4=; b=MG98l2w3tzKunPAl/aUjUMjNzQn7bD4+jDE5Qk1Mgk+SIk82V4PDRVdzGcsAqyaD0I 9EIqSAq+a2PDA/zzcWjxbNjLYvIjAswim6ZcHJ7aDTlB4heWuhwexE/dTYeksdoQSRRh Vmb2kCVDzFqhItzby0lEIfhQxxJeWp5wiZHu7/yya/39c7v9wW/SrpB6x8P5lPVRSWK7 RS+dhKeZYHL5/i1XgfRZtw51Ylfivn0rMnc6qZk8rcOfrmhIAR2SGixzpnveMgUdnyaO Ww9GGI6eJZcB0m2FG6+OLMXG7UTt9tEjVFhBdKKd2dY6VrxVp0NHjzsh8FI4r9xnqu7G s13w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:content-transfer-encoding; bh=bPlvp8sPSyhH+qXlqqVSkQARx1bZr6S90hrO+7RY6w4=; b=YbKJINilGKy3DNOFTtXuQVQx9a6khIGoW/oTTYqeU4wA/hcAONuZ5f9zFjwOXPYvrY dye/m/KXA4D4CBOGHtbU68gQFVWGPcU1XuRe5R1xuD/nimeyhAAnic1Ag8CqKPwXiyEP Lf+/AvbhshktRlKw+HlssSeE97X79UkDxRCXjKtuJpbeJNTWRheu3wnWoUDD97bll5Sb 1QuXjL5QweONykcx+OGNbHvNmFzlCONu520bQk/acCEz6WfSQ9RvATfvIO+bIApguYFA 6J8s0uSNi+zY6IULoB5KEt+WlrPHj7wkbefPYvtdZHzzXg7GtFpqGupKQeoD+4NraJ7g qEmw== X-Gm-Message-State: AN3rC/6tFJfduexHbG77cbZzRHPX2ujjhMRrhU2KlauwxkJi277XrsaG ODO5OtHTNbQmCO3lOaiHaA/UsrK7LuYP X-Received: by 10.28.236.210 with SMTP id h79mr7162193wmi.92.1492772643666; Fri, 21 Apr 2017 04:04:03 -0700 (PDT) Original-Received: by 10.223.169.12 with HTTP; Fri, 21 Apr 2017 04:03:43 -0700 (PDT) In-Reply-To: X-Google-Sender-Auth: Ka8EmEXadQvnsUV3vOWq-_FOvDY X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::233 X-Mailman-Approved-At: Fri, 21 Apr 2017 09:56:02 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:112837 Archived-At: On Fri, Apr 21, 2017 at 5:13 PM, Yuri Khan wrote: > M-: (scroll-up 1) > > Observed behavior: Point is on the same line and the line is at the > top of window. > > Expected behavior: Point is on the same line and the line is second > from the bottom of window. The next line, =E2=80=9Cand NEWS.1-17 for chan= ges > in older Emacs versions.=E2=80=9D, is visible. OK, here=E2=80=99s what I came up with, as a kludge. (defun yk-scroll-up-line () (interactive) (let ((last-line-start (save-excursion (goto-char (window-end)) (forward-line -1) (point))) (orig-point (point))) ;; If in the bottommost visible line, move to a safe place (line up). (when (<=3D last-line-start orig-point) (previous-line)) (scroll-up 1) ;; If we were in the topmost line, ;; the original point is now outside the view, ;; and the point is now on the new topmost line. Leave it there. ;; Otherwise, the original point is still visible. Restore it. (when (pos-visible-in-window-p orig-point) (goto-char orig-point))))