# Swap Lines Bugs

**URL:** <https://forum.obsidian.md/t/swap-lines-bugs/2660>\
**Category:** Bug graveyard\
**Tags:** repro\
**Created:** [July 2, 2020, 2:44am UTC](https://forum.obsidian.md/t/swap-lines-bugs/2660 "2020-07-02T02:44:26Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![malecjan](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/m/a6a055/32.png) [@malecjan](https://forum.obsidian.md/u/malecjan)\
**Post date:** [October 10, 2020, 4:28pm UTC](https://forum.obsidian.md/t/swap-lines-bugs/2660/9 "2020-10-10T16:28:33Z")

</div>

I can confirm this.  
Current behavior: with hotkeys , Ctrl+Shift+Down  
Windows7, Obsidian 0.9.2, Smart indentation ON.  
With five line text:  
1a  
2b  
3c  
4d  
5e

Hotkey Ctrl+Shift+Up bound to “Swap line up” with caret in line “4d”:

- Behaves as Shift+Up (i.e. selects also portion of line above).
- And then swaps [lines involved in selection] with [line above selection].  
results in:  
1a  
3c  
4d  
2b  
5e  
with text “c\n4” being selected (\n meaning line wrap).

Hotkey Ctrl+Up bound to “Swap line up” with caret in line “4d”:

- Behaves as Up, i.e. caret moves to line above (“3c”).
- And then swaps the line “3c” with line above (“2b”).  
1a  
3c  
2b  
4d  
5e

Swapping down with caret in line “2b” behaves equivalently, i.e. as if Shift+Down or Down precedes swapping lines.

This applies to caret in the middle or the end of line, caret at line beginning is exception not analyzed in detail here.

Edit: related issue during clicking links:

> [@Shortcut keys or preferred hotkeys](https://forum.obsidian.md/t/shortcut-keys-or-preferred-hotkeys/2033/11):
>
> Dont know if this is the right place to ask, but I am quite unhappy with the Cmd + Shift + Click behavior on Mac. This is because Shift + Click itself always selects the text from cursor to current line before jumping to the new page. This is quite annoying - has anyone an idea how to fix/workaround?

---

_[View the full topic](https://forum.obsidian.md/t/swap-lines-bugs/2660)._
