branch : pmacs2
This commit is contained in:
moculus 2008-03-20 15:14:13 +00:00
parent 8b403b9455
commit a3a72a7d9a
1 changed files with 2 additions and 1 deletions

View File

@ -633,6 +633,7 @@ class CountWords(Method):
wcount = 0
pcount = 0
inp = False
name = w.buffer.name()
for line in w.buffer.lines:
c = len(line.split())
if c and not inp:
@ -641,7 +642,7 @@ class CountWords(Method):
elif not c and inp:
inp = False
wcount += c
w.set_error("%d words (%d paragraphs) found in the document" % (wcount, pcount))
w.set_error("%d words (%d paragraphs) found in %r" % (wcount, pcount, name))
class JustifyRight(Method):
'''Justify text with the previous line right from the cursor by whitespace'''