Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
056b0976
Commit
056b0976
authored
Aug 26, 2017
by
Paulo Gomes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a cursor column check.
Fixes glich, when cursor is on column 0 of and indented line and you press return an extra indent is added.
parent
dd7145b7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
text_edit.cpp
scene/gui/text_edit.cpp
+2
-2
No files found.
scene/gui/text_edit.cpp
View file @
056b0976
...
...
@@ -2115,14 +2115,14 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
//keep indentation
int
space_count
=
0
;
for
(
int
i
=
0
;
i
<
text
[
cursor
.
line
].
length
();
i
++
)
{
if
(
text
[
cursor
.
line
][
i
]
==
'\t'
)
{
if
(
text
[
cursor
.
line
][
i
]
==
'\t'
&&
cursor
.
column
>
0
)
{
if
(
indent_using_spaces
)
{
ins
+=
space_indent
;
}
else
{
ins
+=
"
\t
"
;
}
space_count
=
0
;
}
else
if
(
text
[
cursor
.
line
][
i
]
==
' '
)
{
}
else
if
(
text
[
cursor
.
line
][
i
]
==
' '
&&
cursor
.
column
>
0
)
{
space_count
++
;
if
(
space_count
==
indent_size
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment