Method: Textbringer::Buffer#save_excursion
- Defined in:
- lib/textbringer/buffer.rb
#save_excursion ⇒ Object
Don’t save Buffer.current.
847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 |
# File 'lib/textbringer/buffer.rb', line 847 def save_excursion old_point = new_mark old_mark = @mark&.dup old_column = @goal_column begin yield ensure point_to_mark(old_point) old_point.delete if old_mark @mark.location = old_mark.location old_mark.delete end @goal_column = old_column end end |