Move Line where it should be.
This commit is contained in:
parent
275128963b
commit
bfe7a3100e
2 changed files with 12 additions and 11 deletions
|
@ -23,16 +23,6 @@ FORMAT_CHAR = '\x19'
|
|||
# I guess. But maybe we can find better chars that are even less risky.
|
||||
format_chars = '\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18'
|
||||
|
||||
# msg is a reference to the corresponding Message object. text_start and
|
||||
# text_end are the position delimiting the text in this line.
|
||||
class Line:
|
||||
__slots__ = ('msg', 'start_pos', 'end_pos', 'prepend')
|
||||
def __init__(self, msg, start_pos, end_pos, prepend):
|
||||
self.msg = msg
|
||||
self.start_pos = start_pos
|
||||
self.end_pos = end_pos
|
||||
self.prepend = prepend
|
||||
|
||||
class DummyWin(object):
|
||||
def __getattribute__(self, name):
|
||||
if name != '__bool__':
|
||||
|
|
|
@ -10,7 +10,7 @@ import curses
|
|||
from math import ceil, log10
|
||||
|
||||
from . import Win
|
||||
from . base_wins import FORMAT_CHAR, Line
|
||||
from . base_wins import FORMAT_CHAR
|
||||
from . funcs import truncate_nick, parse_attrs
|
||||
|
||||
import poopt
|
||||
|
@ -18,6 +18,17 @@ from config import config
|
|||
from theming import to_curses_attr, get_theme, dump_tuple
|
||||
|
||||
|
||||
# msg is a reference to the corresponding Message object. text_start and
|
||||
# text_end are the position delimiting the text in this line.
|
||||
class Line:
|
||||
__slots__ = ('msg', 'start_pos', 'end_pos', 'prepend')
|
||||
def __init__(self, msg, start_pos, end_pos, prepend):
|
||||
self.msg = msg
|
||||
self.start_pos = start_pos
|
||||
self.end_pos = end_pos
|
||||
self.prepend = prepend
|
||||
|
||||
|
||||
class BaseTextWin(Win):
|
||||
def __init__(self, lines_nb_limit=None):
|
||||
if lines_nb_limit is None:
|
||||
|
|
Loading…
Reference in a new issue