All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: grub-devel@gnu.org
Subject: Re: gfxterm/pager regression
Date: Tue, 06 Jul 2010 02:06:47 +0200	[thread overview]
Message-ID: <4C327397.4030508@gmail.com> (raw)
In-Reply-To: <20100705124723.GD21862@riva.ucam.org>


[-- Attachment #1.1: Type: text/plain, Size: 793 bytes --]

On 07/05/2010 02:47 PM, Colin Watson wrote:
> gfxterm is behaving very oddly for me with 'set pager=1' right now; the
> --MORE-- prompt appears after only a few lines of text have been output.
> It looks rather as if it is counting the number of output characters as
> if they were the number of output lines.  This doesn't happen when the
> terminal output is an ordinary VGA console.
>
> Looking at normal/term.c:put_glyphs_terminal, it seems that it
> increments state->num_lines after every glyph.  This seems pretty odd.
> Doesn't it need to do something a bit smarter than that?  Vladimir, is
> this a regression from your bidi branch merge?
>
>   
Looks this way. Please test attached patch.
> Thanks,
>
>   


-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: charnl.diff --]
[-- Type: text/x-diff; name="charnl.diff", Size: 989 bytes --]

=== modified file 'normal/term.c'
--- normal/term.c	2010-07-02 16:20:48 +0000
+++ normal/term.c	2010-07-06 00:05:55 +0000
@@ -616,16 +616,18 @@
       if (visual_ptr->base == '\n')
 	grub_print_spaces (term, margin_right);
       putglyph (visual_ptr, term);
-      if (state && ++state->num_lines
-	  >= (grub_ssize_t) grub_term_height (term) - 2)
-      {
-	state->backlog_glyphs = visual_ptr + 1;
-	state->backlog_len = visual_len - (visual - visual_ptr) - 1;
-	return 1;
-      }
+      if (visual_ptr->base == '\n')
+	{
+	  if (state && ++state->num_lines
+	      >= (grub_ssize_t) grub_term_height (term) - 2)
+	    {
+	      state->backlog_glyphs = visual_ptr + 1;
+	      state->backlog_len = visual_len - (visual - visual_ptr) - 1;
+	      return 1;
+	    }
 
-      if (visual_ptr->base == '\n')
-	grub_print_spaces (term, margin_left);
+	  grub_print_spaces (term, margin_left);
+	}
       grub_free (visual_ptr->combining);
     }
   return 0;


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]

  reply	other threads:[~2010-07-06  0:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-05 12:47 gfxterm/pager regression Colin Watson
2010-07-06  0:06 ` Vladimir 'φ-coder/phcoder' Serbinenko [this message]
2010-07-06 18:26   ` Colin Watson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C327397.4030508@gmail.com \
    --to=phcoder@gmail.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.