summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/message.py2
-rw-r--r--src/room.py6
-rw-r--r--src/window.py4
3 files changed, 6 insertions, 6 deletions
diff --git a/src/message.py b/src/message.py
index 8214e3d8..1ce16bd0 100644
--- a/src/message.py
+++ b/src/message.py
@@ -43,7 +43,7 @@ class Message(object):
class Line(object):
"""
A line, corresponding to ONE row of the text area.
- A message is composed of ONE line or more.
+ A message is composed of ONE line or MORE.
Example:
Text area limit text area limit
diff --git a/src/room.py b/src/room.py
index f9dcabfc..f329ea1c 100644
--- a/src/room.py
+++ b/src/room.py
@@ -68,16 +68,15 @@ class Room(object):
user = self.get_user_by_name(nickname) if nickname is not None else None
if user:
user.set_last_talked(datetime.now())
- time = time if time is not None else datetime.now()
color = None
- if nickname is not None:
+ if not time and nickname is not None:
if not self.jid:
self.set_color_state(12)
else:
self.set_color_state(15)
else:
color = 8
- if nickname != self.own_nick and self.joined and nickname is not None: # do the highlight
+ if not time and nickname != self.own_nick and self.joined and nickname is not None: # do the highlight
try:
if self.own_nick.encode('utf-8') in txt:
self.set_color_state(13)
@@ -96,6 +95,7 @@ class Room(object):
self.set_color_state(13)
color = 2
break
+ time = time if time is not None else datetime.now()
self.messages.append(Message(txt, time, nickname, user, color))
def get_user_by_name(self, nick):
diff --git a/src/window.py b/src/window.py
index 22709436..c62dd869 100644
--- a/src/window.py
+++ b/src/window.py
@@ -332,7 +332,7 @@ class Input(Win):
if not len(self.history):
return
self.reset_completion()
- self.win.clear()
+ self.win.erase()
if self.histo_pos >= 0:
self.histo_pos -= 1
self.text = self.history[self.histo_pos+1]
@@ -347,7 +347,7 @@ class Input(Win):
if not len(self.history):
return
self.reset_completion()
- self.win.clear()
+ self.win.erase()
if self.histo_pos < len(self.history)-1:
self.histo_pos += 1
self.text = self.history[self.histo_pos]