Columns are being really weird

Bug #1659687 reported by Ryan Gonzalez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libvterm
New
Undecided
Unassigned

Bug Description

I'm sorry, but I couldn't think of a better description...

I'm basically doing something like this:

vterm_new(28, 98);

It mostly works, except libvterm always wraps the line with 16 characters left. For instance, if I print 98 a's, then I get

aaaaa... (82 a's)
aaaaa... (16 a's)

So I decided to see if I could reproduce it with `bin/unterm -c98 bin/unterm.c`. And, well...

...
   cols = 80;
        break;
    }
  }

  const char *file = argv[optind++];
  int fd = open(file, O_RDO
NLY);
  if(fd == -1) {
    fprintf(stderr, "Cannot open %s - %s\n", file, strerror(errno));
    exit(
1);
  }

  vt = vterm_new(rows, cols);
  vterm_set_utf8(vt, true);

  vts = vterm_obtain_screen(vt);
  vt
erm_screen_set_callbacks(vts, &cb_screen, NULL);

  vterm_screen_reset(vts, 1);

  int len;
  char buff
er[1024];
  while((len = read(fd, buffer, sizeof(buffer))) > 0) {
    vterm_input_write(vt, buffer,
len);
  }

  for(int row = 0; row < rows; row++) {
    dump_row(row);
  }

  close(fd);

  vterm_free(vt);
}

Yeah, some of these wraps are a bit on the weird side...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.