##// END OF EJS Templates
refactor to improve cell switching in edit mode...
refactor to improve cell switching in edit mode This code was repeated in both CodeCell and TextCell, both of which are extensions of Cell, so this just unifies the logic in Cell. TextCell had logic here to check if the cell was rendered or not, but I don't believe it is possible to end up triggering such a code path. (Should that be required, I can always just add back these methods to TextCell, performing the .rendered==True check, and calling the Cell prior to this, code mirror at_top would only return true on if the cursor was at the first character of the top line. Now, pressing up arrow on any character on the top line will take you to the cell above. The same applies for the bottom line. Pressing down arrow would only go to the next cell if the cursor was at a location *after* the last character (something that is only possible to achieve in vim mode if the last line is empty, for example). Now, down arrow on any character of the last line will go to the next cell.

File last commit:

r4734:e36691ad
r15754:d60e793e
Show More
tclass.py
35 lines | 959 B | text/x-python | PythonLexer
Fernando Perez
Massive amount of work to improve the test suite, restores doctests....
r2414 """Simple script to be run *twice*, to check reference counting bugs.
Fernando Perez
Cleanup testing machinery.
r1851
Fernando Perez
Massive amount of work to improve the test suite, restores doctests....
r2414 See test_run for details."""
Fernando Perez
Cleanup testing machinery.
r1851
Thomas Kluyver
Start using py3compat module.
r4731 from __future__ import print_function
Fernando Perez
Massive amount of work to improve the test suite, restores doctests....
r2414 import sys
Fernando Perez
Fix bug: https://bugs.launchpad.net/ipython/+bug/269966...
r1856
Fernando Perez
Massive amount of work to improve the test suite, restores doctests....
r2414 # We want to ensure that while objects remain available for immediate access,
# objects from *previous* runs of the same script get collected, to avoid
# accumulating massive amounts of old references.
Fernando Perez
Fix bug: https://bugs.launchpad.net/ipython/+bug/269966...
r1856 class C(object):
def __init__(self,name):
self.name = name
Thomas Kluyver
Start using py3compat module.
r4731 self.p = print
Thomas Kluyver
Shell's reset method clears namespace from last %run command.
r3762 self.flush_stdout = sys.stdout.flush
Fernando Perez
Fix bug: https://bugs.launchpad.net/ipython/+bug/269966...
r1856
def __del__(self):
Thomas Kluyver
Start using py3compat module.
r4731 self.p('tclass.py: deleting object:',self.name)
Thomas Kluyver
Shell's reset method clears namespace from last %run command.
r3762 self.flush_stdout()
Fernando Perez
Massive amount of work to improve the test suite, restores doctests....
r2414
Fernando Perez
Fix bug: https://bugs.launchpad.net/ipython/+bug/269966...
r1856 try:
name = sys.argv[1]
except IndexError:
pass
else:
Fernando Perez
- Make ipdoctest a little cleaner by giving it separate option names....
r1910 if name.startswith('C'):
c = C(name)
Fernando Perez
Massive amount of work to improve the test suite, restores doctests....
r2414
#print >> sys.stderr, "ARGV:", sys.argv # dbg
Fernando Perez
Fix extensions test suite (small, but now it runs and passes!)
r2415
# This next print statement is NOT debugging, we're making the check on a
# completely separate process so we verify by capturing stdout:
Thomas Kluyver
Repair various failures in the test suite.
r4734 print('ARGV 1-:', sys.argv[1:])
Fernando Perez
Robustness fixes in test suite machinery....
r2494 sys.stdout.flush()