Re: [pgAdmin4][Patch]: To fix Indentation issue in query tool

Поиск
Список
Период
Сортировка
От Murtuza Zabuawala
Тема Re: [pgAdmin4][Patch]: To fix Indentation issue in query tool
Дата
Msg-id CAKKotZQZC4v_kHNqKtXL_+axAvCrVt_+q6B2Pj=NZ1gEyYo4VA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [pgAdmin4][Patch]: To fix Indentation issue in query tool  (Dave Page <dpage@pgadmin.org>)
Ответы Re: [pgAdmin4][Patch]: To fix Indentation issue in query tool
Список pgadmin-hackers
Sorry, that was a typo in 'sqleditor/__init__.py'.

I have updated the patch, We require this option because by default codemirror indent the code with spaces.

Steps to re-produce (without patch):
1) With preference option
  Use spaces? = False
  Tab size = 4

2) Open query tool
- Press Tabs key 3-4 times & type select 1; <enter>
- Observe the new line indentation using right arrow key. (Attaching screenshot)

This patch allow us to use Tab key as indentation. 

Now apply the patch set the option Use tabs for indentation? to true and check the same behaviour.
 

On Mon, Oct 16, 2017 at 2:14 PM, Dave Page <dpage@pgadmin.org> wrote:
Hi

On Mon, Oct 16, 2017 at 5:43 AM, Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote:
Hi,

PFA patch to fix the issue where indentation is not working as expected, when user opt for tab based indentation instead of space based indentation.
RM#2780

Shouldn't we just use the use_spaces option here? I don't see any reason why pressing tab vs. an auto-indent should be any different.

As a sidenote, in sqleditor/__init__.py, both config options are being defined as "self.use_spaces = ..." 

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Вложения

В списке pgadmin-hackers по дате отправления:

Предыдущее
От: Dave Page
Дата:
Сообщение: Re: [pgAdmin4][Patch]: To fix Indentation issue in query tool
Следующее
От: Dave Page
Дата:
Сообщение: Re: [pgAdmin4][Patch]: To fix Indentation issue in query tool