def keypress(self, size, key):
        if not self.app.input_buffer:
            key = super(SideDiffCommentEdit, self).keypress(size, key)
        keys = self.app.input_buffer + [key]
        commands = self.app.config.keymap.getCommands(keys)

        if ((keymap.NEXT_SELECTABLE in commands) or
            (keymap.PREV_SELECTABLE in commands)):
            if ((self.context.old_ln is not None or
                 self.context.new_ln is not None) or
                self.context.header):
                if self.focus_position == 3:
                    self.focus_position = 1
                else:
                    self.focus_position = 3
            return None
        return key
dataset/ETHPy150Open openstack/gertty/gertty/view/side_diff.py/SideDiffCommentEdit.keypress/operator `and` -> `or`