Fix mouse input issue in terminal mode caused by smart-shift

Replace the smart-shift package with functions ripped from textmate.el
This commit is contained in:
2018-07-10 11:52:56 +01:00
parent cf6f8e538c
commit d218da5083
2 changed files with 31 additions and 1 deletions

View File

@@ -78,7 +78,7 @@
(require 'siren-move-dup)
(require 'siren-multiple-cursors)
(require 'siren-randomize-region)
(require 'siren-smart-shift)
(require 'siren-shift-text)
(require 'siren-smartparens)
(require 'siren-sort-symbols)
(require 'siren-sort-words)

View File

@@ -0,0 +1,30 @@
;;; siren-shift-text.el --- jimeh's Emacs Siren: shift-text
;;; Commentary:
;; Configuration for shift-text
;;; Code:
(defun siren-shift-right (&optional arg)
"Shift the line or region to the ARG places to the right.
A place is considered `tab-width' character columns."
(interactive)
(let ((deactivate-mark nil)
(beg (or (and mark-active (region-beginning))
(line-beginning-position)))
(end (or (and mark-active (region-end)) (line-end-position))))
(indent-rigidly beg end (* (or arg 1) tab-width))))
(defun siren-shift-left (&optional arg)
"Shift the line or region to the ARG places to the left."
(interactive)
(siren-shift-right (* -1 (or arg 1))))
(global-set-key (kbd "C-c [") 'siren-shift-left)
(global-set-key (kbd "C-c ]") 'siren-shift-right)
(global-set-key (kbd "M-[") 'siren-shift-left)
(global-set-key (kbd "M-]") 'siren-shift-right)
(provide 'siren-shift-text)
;;; siren-shift-text.el ends here