<p>This is a sister implementation for "k" in order to behave like "j" when wrapping is on (see <a class="issue-link js-issue-link" data-error-text="Failed to load issue title" data-id="328274646" data-permission-text="Issue title is private" data-url="https://github.com/geany/geany-plugins/issues/748" href="https://github.com/geany/geany-plugins/pull/748">#748</a>). The problem with the current implementation is that "k" moves caret to the last line of a wrapped line instead of the first one like "j".</p>
<p><a class="user-mention" data-hovercard-user-id="1506734" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/pcworld">@pcworld</a> Can you check if it looks good to you? This one is a bit more complex because one has to either "iterate" over the wraps when going up (for the first line only) or go to the previous line and go down.</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/geany/geany-plugins/pull/754'>https://github.com/geany/geany-plugins/pull/754</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>vimode: When wrapping is on, "k" should go to the first line of wrapping</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/geany/geany-plugins/pull/754/files#diff-0">vimode/src/cmds/motion.c</a>
    (48)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/geany/geany-plugins/pull/754.patch'>https://github.com/geany/geany-plugins/pull/754.patch</a></li>
  <li><a href='https://github.com/geany/geany-plugins/pull/754.diff'>https://github.com/geany/geany-plugins/pull/754.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany-plugins/pull/754">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABDrJ9SVnkG8xSl2H6Igwjz2lyKsy6RCks5t8lKrgaJpZM4Un1x0">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABDrJ_52bKAniCT7BYbYK4TNgstE_lUMks5t8lKrgaJpZM4Un1x0.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","potentialAction":{"@type":"ViewAction","target":"https://github.com/geany/geany-plugins/pull/754","url":"https://github.com/geany/geany-plugins/pull/754","name":"View Pull Request"},"description":"View this Pull Request on GitHub","publisher":{"@type":"Organization","name":"GitHub","url":"https://github.com"}}</script>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/geany/geany-plugins","title":"geany/geany-plugins","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/geany/geany-plugins"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"vimode: When wrapping is on, \"k\" should go to the first line of wrapping (#754)"}],"action":{"name":"View Pull Request","url":"https://github.com/geany/geany-plugins/pull/754"}}}</script>
<script type="application/ld+json">{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"hideOriginalBody": "false",
"originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB",
"title": "vimode: When wrapping is on, \"k\" should go to the first line of wrapping (#754)",
"sections": [
{
"text": "",
"activityTitle": "**Jiří Techet**",
"activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png",
"activitySubtitle": "@techee",
"facts": [

]
},
{
"title": "Commit Summary",
"facts": [
{
"name": "77a5c96",
"value": "vimode: When wrapping is on, \"k\" should go to the first line of wrapping"
}
]
},
{
"title": "File Changes",
"facts": [
{
"name": "Modified",
"value": "[vimode/src/cmds/motion.c](https://github.com/geany/geany-plugins/pull/754/files#diff-0) (48 changes)"
}
]
}
],
"potentialAction": [
{
"name": "Add a comment",
"@type": "ActionCard",
"inputs": [
{
"isMultiLine": true,
"@type": "TextInput",
"id": "IssueComment",
"isRequired": false
}
],
"actions": [
{
"name": "Comment",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"geany/geany-plugins\",\n\"issueId\": 754,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}"
}
]
},
{
"name": "Close pull request",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"PullRequestClose\",\n\"repositoryFullName\": \"geany/geany-plugins\",\n\"pullRequestId\": 754\n}"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/geany/geany-plugins/pull/754"
}
],
"@type": "OpenUri",
"name": "View on GitHub"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/geany/geany-plugins/pull/754.patch"
}
],
"@type": "OpenUri",
"name": "View patch"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/geany/geany-plugins/pull/754.diff"
}
],
"@type": "OpenUri",
"name": "View diff"
},
{
"name": "Unsubscribe",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 345988212\n}"
}
],
"themeColor": "26292E"
}</script>