bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#45748: 28.0.50; fit-frame-to-buffer ignores leading spaces


From: Aaron Jensen
Subject: bug#45748: 28.0.50; fit-frame-to-buffer ignores leading spaces
Date: Sun, 10 Jan 2021 11:31:44 -0600

On Sun, Jan 10, 2021 at 10:05 AM martin rudalics <rudalics@gmx.at> wrote:
>
>  > Let me know how this looks and if you want me to make any tweaks.
>
>           dec_both (&end, &bpos);
>           c = FETCH_BYTE (bpos);
>           if (!(c == ' ' || c == '\t' || c == '\n' || c == '\r'))
>
> Sorry but on that last line I have
>
>           if (!(c == ' ' || c == '\t'))
>
> or am I confused?

Not sure I follow, does the patch not apply?



Here is what I have after my patch for the handling of the TO == t:

      end = ZV;
      bpos = ZV_BYTE;
      while (bpos > BEGV_BYTE)
{
  dec_both (&end, &bpos);
  c = FETCH_BYTE (bpos);
  if (!(c == ' ' || c == '\t' || c == '\n' || c == '\r'))
            {
      inc_both (&end, &bpos);
      break;
            }
}
      while (bpos < ZV_BYTE)
{
  c = fetch_char_advance (&end, &bpos);
  if (!(c == ' ' || c == '\t'))
    break;
}

and before:

      end = ZV;
      bpos = ZV_BYTE;
      while (bpos > BEGV_BYTE)
{
  dec_both (&end, &bpos);
  c = FETCH_BYTE (bpos);
  if (!(c == ' ' || c == '\t' || c == '\n' || c == '\r'))
    break;
}
      while (bpos < ZV_BYTE)
{
  c = fetch_char_advance (&end, &bpos);
  if (!(c == ' ' || c == '\t'))
    break;
}

The difference is the inc_both before the break in the *first* loop,
not the second.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]