martanne / dvtm

dvtm brings the concept of tiling window management, popularized by X11-window managers like dwm to the console. As a console window manager it tries to make it easy to work with multiple console based programs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Remember line wraps for copypaste

divVerent opened this issue · comments

With raw rxvt-unicode and also with tmux, the terminal knows where line wraps happened by remembering for each line how the cursor advanced to the next line (by wrap or by newline).

That way, copying a wrapped line to the X11 cut buffer (or with dvtm's own editor/pager support) will not include a line break at the wrap.

So I'd like dvtm to do two things:

  • Remember how lines got advanced, so the internal copy/paste support combines wrapped lines again.
  • When drawing the last column, be explicit in how to advance to the next line by either always sending a newline right after the last column character (then possibly repositioning the cursor as terminals differ on where the cursor is after this) to force not combining the lines, or not to force wrap-combining at terminal level.