Mon-Ouie / coolline

Simple readline-like tool able to change representation of input
Other
82 stars 14 forks source link

Some fixes for Linux terminals (specifically, libvte based ones) #13

Closed epitron closed 11 years ago

epitron commented 11 years ago
epitron commented 11 years ago

NOTE: This commit is a lot more readable in WORD-diff mode: https://github.com/epitron/coolline/commit/533d4f7aee8dac8507fb63e408141b26baa5e3c6?w=1

epitron commented 11 years ago

Sweeeeet.

Mon-Ouie commented 11 years ago

I think I might have reintroduced one issue I have here.

The problem with IO#read is that it reads a single /byte/, which causes encoding issues when the user inputs multibyte characters.

I'm not sure how to get both issues fixed (or if IO#getch still makes those syscalls every time if the input is already in raw-mode)

EDIT:

I just realize I can just use IO#getc. This shouldn't reintroduce your problem.

epitron commented 11 years ago

Good old IO! :+1: