스플릿된 탭의 닫기 버튼을 누르면 다 닫혀버리길래
20줄도 안되는 존내 간단한 코드로 자연스러운 탭닫기 동작을 만들었음.
(defun centaur-tabs-do-close (event)
"Given a mouse EVENT, close the tab at the mouse point."
(interactive "e")
(let ((window (posn-window (event-start event))))
(with-selected-window window
(select-window window)
(let ((forground-buffer-name (buffer-name)))
(centaur-tabs-buffer-select-tab `,(centaur-tabs-get-tab-from-event event))
(let* ((buffer (window-buffer window))
(target-buffer-name (buffer-name))
(same-target-check (string-equal forground-buffer-name target-buffer-name))
(window-num (- (length (get-buffer-window-list buffer))
(if same-target-check 0 1))))
(if (> window-num 1)
(delete-window window)
(centaur-tabs-buffer-close-tab `,(centaur-tabs-get-tab-from-event event))))))))
메인테이너가 바빠서 좀 느린 것 같은데,
설정파일에 함수 복붙해서 넣으면 재정의되서 써볼 수 있음.
리슾 넘 커욥습니다
((((ㅋㅋㅋㅋ))))
개추함. 실용적인 패치임다. 내가 볼 때는 저거 버그 같다.
원래 내장된 탭에 패치 적용해서 썼는데 UI가 구려서 저 라이브러리로 넘어 갔었죠. 근데 닫기버튼 동작이 이상하길래 라이브러리 구현 보니까 그냥 닫도록 되어있더군요. 그동안 메인테이너가 귀찮아서 구현 안한 듯...
어? 오타발견. ㅋㅋㅋ foreground라 썼어야 했는데 forground라고 했네.
오픈소스 (희망편) - dc App
저는 조팝이라 ㅠㅠㅠ