Example #1
0
    def test_resize(self):
        """lines and cursor pos wrap, reported by line

        The front of the current line retains its position!"""
        with tmux.TmuxPane(10, 10) as t:
            self.assertEqual(tmux.cursor_pos(t), (0, 1))
            tmux.send_command(t, 'true 123456789')
            self.assertEqual(tmux.visible(t),
                             ['$true 1234', '56789', '$'])
            self.assertEqual(tmux.cursor_pos(t), (2, 1))
            t.set_width(5)
            self.assertEqual(tmux.cursor_pos(t), (2, 1))
            self.assertEqual(tmux.visible_after_prompt(t),
                             [' 1234', '56789', '$'])
            tmux.stepwise_resize_width(t, 20)
            tmux.stepwise_resize_height(t, 20)
Example #2
0
 def resize(self, before, after, t):
     tmux.stepwise_resize_width(t, after.width)
     tmux.stepwise_resize_height(t, after.height)