This repository was archived by the owner on Aug 31, 2021. It is now read-only.
Commit 5149261
committed
[[ Bug 20851 ]] Fix case/break completion
This patch fixes the completion of `case` statements with `break` where
an existing `break` statement already exists. The depth was not being
calculated correctly so that if multiple `switch` structures were in the
same script the second and subsequent structures added extra `break`
statements when hitting return after the `case` statement.
Additionally this patch ensures that `case` is only completed with `break`
if there is no other code for the case as it is unhelpful to put `break`
before the code under any circumstances.1 parent 066e261 commit 5149261
2 files changed
Lines changed: 19 additions & 0 deletions
File tree
- Toolset/palettes/script editor/behaviors
- notes
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1807 | 1807 | | |
1808 | 1808 | | |
1809 | 1809 | | |
| 1810 | + | |
| 1811 | + | |
| 1812 | + | |
| 1813 | + | |
| 1814 | + | |
1810 | 1815 | | |
1811 | 1816 | | |
1812 | 1817 | | |
| |||
1854 | 1859 | | |
1855 | 1860 | | |
1856 | 1861 | | |
| 1862 | + | |
| 1863 | + | |
| 1864 | + | |
| 1865 | + | |
| 1866 | + | |
| 1867 | + | |
| 1868 | + | |
| 1869 | + | |
| 1870 | + | |
| 1871 | + | |
| 1872 | + | |
| 1873 | + | |
| 1874 | + | |
1857 | 1875 | | |
1858 | 1876 | | |
1859 | 1877 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
0 commit comments