Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • K KTextEditor
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 1
    • Issues 1
    • List
    • Boards
    • Service Desk
    • Milestones
  • Bugzilla
    • Bugzilla
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • FrameworksFrameworks
  • KTextEditor
  • Merge requests
  • !76

Fix indent for when pressing enter and the function param has a comma at the end

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Waqar Ahmed requested to merge work/fixindent into master Jan 17, 2021
  • Overview 5
  • Commits 1
  • Pipelines 0
  • Changes 6

Consider the case ([C] = cursor position):

void fn(int a,[C])

Pressing enter results in:

void fn(int a,
    [C]
)

which is totally opposite of what's expected.

With this change on pressing enter you will get this result:

void fn(int a,
        [C])

The cursor is aligned with the first char after the matching opening bracket. I have added a new testcase (plist26) to test this. Two test cases (plist20 and plist13) have been modified to pass the results. The modification is necessary because previously the cursor was aligned to the opening bracket and not one char after the bracket.

Edited Jan 17, 2021 by Waqar Ahmed
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: work/fixindent