diff --git a/buffer.py b/buffer.py index e6e242e..06418ef 100644 --- a/buffer.py +++ b/buffer.py @@ -523,6 +523,10 @@ class Binary32Buffer(FileBuffer): def __init__(self, path, nl='\n', name=None): '''fb = FileBuffer(path)''' FileBuffer.__init__(self, path, nl, name) + def overwrite_char(self, p, c, act=ACT_NORM, force=False): + Buffer.overwrite_char(self, p, c, act, force) + rawline = self.rawdata[p.y] + self.rawdata[p.y] = rawline[0:p.x] + c + rawline[p.x + 1:] def read_filter(self, data): self.rawdata = [] lines = [] diff --git a/window.py b/window.py index 269260f..904f4d0 100644 --- a/window.py +++ b/window.py @@ -541,7 +541,7 @@ class Window(object): def overwrite_char(self, p, c): line = self.buffer.lines[p.y] if p.x >= len(line): - self.insert_string(p, c) + return elif p.x == len(line) - 1: self.buffer.overwrite_char(p, c) if p.y < len(self.buffer.lines):