##// END OF EJS Templates
move empty line padding to before append of current line
vivainio -
Show More
@@ -2,7 +2,7 b''
2 """
2 """
3 Logger class for IPython's logging facilities.
3 Logger class for IPython's logging facilities.
4
4
5 $Id: Logger.py 1336 2006-05-30 06:09:15Z fperez $
5 $Id: Logger.py 2653 2007-08-22 18:01:09Z vivainio $
6 """
6 """
7
7
8 #*****************************************************************************
8 #*****************************************************************************
@@ -196,6 +196,13 b' which already exists. But you must first start the logging process with'
196 print 'userns:',self.shell.user_ns.keys()
196 print 'userns:',self.shell.user_ns.keys()
197 return
197 return
198
198
199 out_cache = self.shell.outputcache
200
201 # add blank lines if the input cache fell out of sync.
202 if out_cache.do_full_cache and \
203 out_cache.prompt_count +1 > len(input_hist):
204 input_hist.extend(['\n'] * (out_cache.prompt_count - len(input_hist)))
205
199 if not continuation and line_mod:
206 if not continuation and line_mod:
200 self._iii = self._ii
207 self._iii = self._ii
201 self._ii = self._i
208 self._ii = self._i
@@ -210,11 +217,7 b' which already exists. But you must first start the logging process with'
210 to_main = {'_i':self._i,'_ii':self._ii,'_iii':self._iii}
217 to_main = {'_i':self._i,'_ii':self._ii,'_iii':self._iii}
211 if self.shell.outputcache.do_full_cache:
218 if self.shell.outputcache.do_full_cache:
212 in_num = self.shell.outputcache.prompt_count
219 in_num = self.shell.outputcache.prompt_count
213 # add blank lines if the input cache fell out of sync. This can
220
214 # happen for embedded instances which get killed via C-D and then
215 # get resumed.
216 while in_num >= len(input_hist):
217 input_hist.append('\n')
218 # but if the opposite is true (a macro can produce multiple inputs
221 # but if the opposite is true (a macro can produce multiple inputs
219 # with no output display called), then bring the output counter in
222 # with no output display called), then bring the output counter in
220 # sync:
223 # sync:
@@ -2,6 +2,10 b''
2
2
3 * iplib.py: no extra empty (last) line in raw hist w/ multiline
3 * iplib.py: no extra empty (last) line in raw hist w/ multiline
4 statements
4 statements
5
6 * logger.py: Fix bug where blank lines in history were not
7 added until AFTER adding the current line; translated and raw
8 history should finally be in sync with prompt now.
5
9
6 2007-08-21 Ville Vainio <vivainio@gmail.com>
10 2007-08-21 Ville Vainio <vivainio@gmail.com>
7
11
General Comments 0
You need to be logged in to leave comments. Login now